-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
201 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
lib/features/digital_guide_view/tabs/structure/presentation/views/level_view.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import "package:auto_route/auto_route.dart"; | ||
import "package:flutter/material.dart"; | ||
import "package:flutter_riverpod/flutter_riverpod.dart"; | ||
|
||
import "../../../../../../config/nav_bar_config.dart"; | ||
import "../../../../../../config/ui_config.dart"; | ||
import "../../../../../../theme/app_theme.dart"; | ||
import "../../../../../../utils/context_extensions.dart"; | ||
import "../../../../../../widgets/detail_views/detail_view_app_bar.dart"; | ||
import "../../../../../../widgets/my_error_widget.dart"; | ||
import "../../../../../navigation_tab_view/navigation_tab_view.dart"; | ||
import "../../../../../navigator/utils/navigation_commands.dart"; | ||
import "../../../../data/models/level_with_regions.dart"; | ||
import "../../../../presentation/widgets/accessibility_button.dart"; | ||
import "../../../../presentation/widgets/digital_guide_nav_link.dart"; | ||
|
||
@RoutePage() | ||
class LevelView extends ConsumerWidget { | ||
const LevelView({ | ||
required this.levelInfo, | ||
}); | ||
final LevelWithRegions levelInfo; | ||
|
||
@override | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
return Scaffold( | ||
appBar: DetailViewAppBar(), | ||
body: Padding( | ||
padding: const EdgeInsets.symmetric( | ||
horizontal: DigitalGuideConfig.heightBig, | ||
), | ||
child: CustomScrollView( | ||
slivers: [ | ||
SliverList( | ||
delegate: SliverChildListDelegate([ | ||
Text(levelInfo.level.translations.plTranslation.name, | ||
style: context.textTheme.headline.copyWith(fontSize: 22),), | ||
const SizedBox( | ||
height: DigitalGuideConfig.heightSmall, | ||
), | ||
Text(context.localize.rooms_distribution, | ||
style: context.textTheme.boldBody.copyWith(fontSize: 16),), | ||
const SizedBox( | ||
height: DigitalGuideConfig.heightSmall, | ||
), | ||
Text( | ||
levelInfo.level.translations.plTranslation.roomNumbersRange, | ||
style: context.textTheme.body.copyWith(fontSize: 16),), | ||
const SizedBox( | ||
height: DigitalGuideConfig.heightMedium, | ||
), | ||
]), | ||
), | ||
SliverList( | ||
delegate: SliverChildBuilderDelegate( | ||
(context, index) => Column( | ||
children: [ | ||
DigitalGuideNavLink( | ||
onTap: () async { | ||
await ref.navigateDigitalGuideRegion( | ||
levelInfo.regions[index]); | ||
}, | ||
text: levelInfo | ||
.regions[index].translations.plTranslation.name, | ||
), | ||
const SizedBox( | ||
height: DigitalGuideConfig.heightMedium, | ||
), | ||
], | ||
), | ||
childCount: levelInfo.regions.length, | ||
), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
lib/features/digital_guide_view/tabs/structure/presentation/views/region_view.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import "package:auto_route/auto_route.dart"; | ||
import "package:flutter/material.dart"; | ||
import "package:flutter_riverpod/flutter_riverpod.dart"; | ||
|
||
import "../../../../../../config/ui_config.dart"; | ||
import "../../../../../../theme/app_theme.dart"; | ||
import "../../../../../../utils/context_extensions.dart"; | ||
import "../../../../../../widgets/detail_views/detail_view_app_bar.dart"; | ||
import "../../../../data/models/region.dart"; | ||
import "../../../../presentation/widgets/digital_guide_nav_link.dart"; | ||
|
||
@RoutePage() | ||
class RegionView extends ConsumerWidget { | ||
const RegionView({ | ||
required this.region, | ||
}); | ||
|
||
final Region region; | ||
|
||
@override | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
return Scaffold( | ||
appBar: DetailViewAppBar(), | ||
body: Padding( | ||
padding: const EdgeInsets.symmetric( | ||
horizontal: DigitalGuideConfig.heightBig, | ||
), | ||
child: CustomScrollView( | ||
slivers: [ | ||
SliverList( | ||
delegate: SliverChildListDelegate([ | ||
Text(region.translations.plTranslation.name, | ||
style: context.textTheme.headline.copyWith(fontSize: 22),), | ||
const SizedBox( | ||
height: DigitalGuideConfig.heightSmall, | ||
), | ||
Text(context.localize.region_location, | ||
style: context.textTheme.boldBody.copyWith(fontSize: 16),), | ||
const SizedBox( | ||
height: DigitalGuideConfig.heightSmall, | ||
), | ||
Text( | ||
region.translations.plTranslation.location, | ||
style: context.textTheme.body.copyWith(fontSize: 16),), | ||
const SizedBox( | ||
height: DigitalGuideConfig.heightMedium, | ||
), | ||
// corridors | ||
// DigitalGuideNavLink( | ||
// onTap: onTap, | ||
// text: text | ||
// ) | ||
]), | ||
), | ||
], | ||
) | ||
), | ||
); | ||
} | ||
} |
78 changes: 0 additions & 78 deletions
78
lib/features/digital_guide_view/tabs/structure/presentation/views/regions_view.dart
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.