Skip to content

Commit

Permalink
Merge branch 'main' into feat/create-digital-guide-screen
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-the-shark authored Dec 8, 2024
2 parents d9a103b + aa6c7d8 commit 4966461
Show file tree
Hide file tree
Showing 45 changed files with 519 additions and 259 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Read more at: https://solvro.pwr.edu.pl/portfolio/to-pwr/.

## Links

[![docs.solvro.pl](https://i.imgur.com/fuV0gra.png)](https://docs.solvro.pl/guides/flutter-mobile)

- https://www.figma.com/file/33ofdGYbBzWvDi2MabxIc1/ToPWR-(imported)?type=design&node-id=2%3A2091&mode=design&t=qILflhzpbN8xW8F6-1
- https://solvro.pwr.edu.pl/blog/fix-flutter-android-back-btn

Expand Down Expand Up @@ -154,7 +156,7 @@ Don't worry if you've forgotten about the steps, automatic gh action will run th

### Github Solvro Handbook 🔥

https://docs.google.com/document/d/1Sb5lYqYLnYuecS1Essn3YwietsbuLPCTsTuW0EMpG5o/edit?usp=sharing
https://docs.solvro.pl/guides/github

### SSH

Expand Down
1 change: 1 addition & 0 deletions assets/animations/sks_closed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"v":"5.5.5","fr":30,"ip":0,"op":60,"w":1920,"h":1920,"nm":"general","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"forchetta contorni","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":11.795,"s":[-44]},{"t":23.0000009368092,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":11.795,"s":[1141.996,962.459,0],"to":[-20,-0.667,0],"ti":[20,0.667,0]},{"t":23.0000009368092,"s":[1021.9960000000001,958.4589999999998,0]}],"ix":2},"a":{"a":0,"k":[391.246,401.786,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[11.979,-12.302],[0,0],[46.202,28.114],[0,0],[0,0],[0,0],[-39.784,40.856],[0,0],[-11.979,-12.302],[11.979,-12.303],[0,0],[-5.99,-6.151],[-5.991,6.151],[0,0],[-11.979,-12.302],[11.98,-12.302],[0,0],[-5.989,-6.151],[-5.991,6.151],[0,0],[-11.979,-12.302]],"o":[[0,0],[-39.784,40.856],[0,0],[0,0],[0,0],[-27.376,-47.447],[0,0],[11.979,-12.302],[11.979,12.303],[0,0],[-5.99,6.151],[5.989,6.151],[0,0],[11.979,-12.302],[11.98,12.303],[0,0],[-5.989,6.151],[5.989,6.151],[0,0],[11.979,-12.302],[11.979,12.302]],"v":[[379.017,-213.506],[143.734,28.119],[-2.997,47.01],[-348.217,401.535],[-390.996,357.602],[-45.776,3.078],[-27.381,-147.608],[207.902,-389.233],[250.681,-389.233],[250.681,-345.301],[42.143,-131.142],[42.143,-109.176],[63.533,-109.176],[272.07,-323.335],[314.849,-323.335],[314.849,-279.403],[106.311,-65.244],[106.311,-43.278],[127.701,-43.278],[336.238,-257.437],[379.017,-257.437]],"c":true},"ix":2},"nm":"Tracciato 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.5569,0.2275,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Riempimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[391.246,401.786],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Gruppo 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600.000024438501,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Livello forma 2","tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1121.945,308,0],"ix":2},"a":{"a":0,"k":[-318.055,-652,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":0,"s":[165,0,100]},{"t":12.3850005044514,"s":[165,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[747.891,1277.953],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Tracciato rettangolo 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.1255,0.1529,0.1725,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":64,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Traccia 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.5569,0.2275,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Riempimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-318.055,-13.023],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Rettangolo 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600.000024438501,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"coltello contorni","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":11.795,"s":[45]},{"t":23.0000009368092,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":11.795,"s":[755.866,986.576,0],"to":[20,0,0],"ti":[-20,0,0]},{"t":23.0000009368092,"s":[875.8659999999999,986.576,0]}],"ix":2},"a":{"a":0,"k":[389.749,373.668,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-94.542,97.09],[0,0],[0,0],[0,0],[20.964,-5.709],[63.312,65.018]],"o":[[0,0],[0,0],[0,0],[-19.251,11.86],[-80.852,22.406],[-94.542,-97.091]],"v":[[-294.956,-373.418],[389.498,329.486],[346.72,373.418],[-1.066,16.257],[-61.386,42.175],[-294.956,-21.963]],"c":true},"ix":2},"nm":"Tracciato 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.5569,0.2275,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Riempimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[389.748,373.668],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Gruppo 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600.000024438501,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Livello forma 1","tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[641.945,1585.953,0],"ix":2},"a":{"a":0,"k":[-318.055,625.953,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":0,"s":[165,0,100]},{"t":12.3850005044514,"s":[165,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[747.891,1277.953],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Tracciato rettangolo 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.5569,0.2275,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":64,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Traccia 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.5569,0.2275,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Riempimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-318.055,-13.023],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Rettangolo 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600.000024438501,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Livello forma 9","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":31,"s":[100]},{"t":58.0000023623884,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[960,960,0],"ix":2},"a":{"a":0,"k":[8.219,100.219,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":31,"s":[0,0,100]},{"t":58.0000023623884,"s":[150,150,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1096.438,1096.438],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Tracciato ellisse 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9922,0.949,0.9922,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Riempimento 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[8.219,100.219],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Ellisse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600.000024438501,"st":0,"bm":0}],"markers":[]}
16 changes: 16 additions & 0 deletions lib/config/nav_bar_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import "package:flutter/material.dart";
import "../features/bottom_nav_bar/bottom_nav_bar_icon_icons.icons.dart";
import "../features/navigator/app_router.dart";
import "../features/parkings_view/widgets/parkings_icons.icons.dart";
import "../utils/context_extensions.dart";

enum NavBarEnum {
home(BottomNavBarIcon.home_icon, 26, "Home"),
Expand Down Expand Up @@ -43,4 +44,19 @@ extension IsRouteATabViewX on PageRouteInfo<dynamic> {
NavBarEnum? get tabBarEnum => routeName.tabBarEnum;

bool get isTabView => routeName.isTabView;

String? getFormatedRouteName(BuildContext context) {
return switch (routeName) {
HomeRoute.name => context.localize.home_screen,
NavigationTabRoute.name => context.localize.other_view,
DepartmentsRoute.name => context.localize.departments,
SksMenuRoute.name => context.localize.sks_menu,
ScienceClubsRoute.name => context.localize.scientific_cirlces,
GuideRoute.name => context.localize.guide,
BuildingsRoute.name => context.localize.buildings_title,
ParkingsRoute.name => context.localize.parkings_title,
DepartmentDetailRoute.name => context.localize.department,
_ => null,
};
}
}
11 changes: 7 additions & 4 deletions lib/config/ui_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ abstract class AboutUsConfig {
static const borderRadius = 8.0;
static const iconPadding = 10.0;
static const photoSize = 92.0;

static const dialogHorizontalPadding = 14.0;
static const dialogVerticalPadding = 20.0;
static const dialogButtonFontSize = 16.0;
static const dialogTitleFontSize = 24.0;
}

Expand Down Expand Up @@ -201,6 +197,7 @@ abstract class SksConfig {
static const sizedBoxWidth = 5.0;
static const radius = 8.0;
static const innerPadding = EdgeInsets.symmetric(horizontal: 8, vertical: 4);
static const outerPaddingLarge = EdgeInsets.only(right: 24, bottom: 2);
static const outerPadding = EdgeInsets.only(right: 12, bottom: 2);
}

Expand All @@ -218,3 +215,9 @@ abstract class DigitalGuideConfig {
static const heightBig = 24.0;
static const heightHuge = 48.0;
}

abstract class AlertDialogConfig {
static const horizontalPadding = 14.0;
static const verticalPadding = 20.0;
static const buttonFontSize = 16.0;
}
2 changes: 1 addition & 1 deletion lib/features/about_us_view/about_us_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AboutUsView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: DetailViewAppBar(title: context.localize.guide),
appBar: DetailViewAppBar(),
body: const _AboutUsView(),
);
}
Expand Down
85 changes: 14 additions & 71 deletions lib/features/about_us_view/utils/custom_license_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import "package:flutter/material.dart";
import "../../../config/ui_config.dart";
import "../../../theme/app_theme.dart";
import "../../../utils/context_extensions.dart";
import "../../../widgets/my_alert_dialog.dart";

Future<void> showCustomLicenseDialog({
required BuildContext context,
Expand All @@ -11,86 +12,28 @@ Future<void> showCustomLicenseDialog({
required String applicationLegalese,
required Widget applicationIcon,
}) async {
await showDialog<void>(
await showCustomDialog(
context: context,
builder: (BuildContext context) {
return _AlertDialog(
onConfirmTapped: (context) {
Navigator.of(context).pop();
showLicensePage(
context: context,
applicationName: applicationName,
applicationIcon: applicationIcon,
applicationVersion: applicationVersion,
applicationLegalese: applicationLegalese,
applicationIcon: applicationIcon,
);
},
confirmText: context.localize.show_license,
dialogContent: _DialogContent(
applicationName: applicationName,
applicationVersion: applicationVersion,
applicationIcon: applicationIcon,
applicationLegalese: applicationLegalese,
),
);
}

class _AlertDialog extends StatelessWidget {
final String applicationName;
final String applicationVersion;
final String applicationLegalese;
final Widget applicationIcon;

const _AlertDialog({
required this.applicationName,
required this.applicationVersion,
required this.applicationLegalese,
required this.applicationIcon,
});

@override
Widget build(BuildContext context) {
return AlertDialog(
content: Padding(
padding: const EdgeInsets.symmetric(
horizontal: AboutUsConfig.dialogHorizontalPadding,
vertical: AboutUsConfig.dialogVerticalPadding,
),
child: _DialogContent(
applicationName: applicationName,
applicationVersion: applicationVersion,
applicationIcon: applicationIcon,
applicationLegalese: applicationLegalese,
),
),
actions: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
TextButton(
child: Text(
context.localize.show_license,
style: context.textTheme.bodyOrange.copyWith(
fontSize: AboutUsConfig.dialogButtonFontSize,
),
),
onPressed: () {
showLicensePage(
context: context,
applicationName: applicationName,
applicationIcon: applicationIcon,
applicationVersion: applicationVersion,
applicationLegalese: applicationLegalese,
);
},
),
TextButton(
child: Text(
context.localize.close,
style: context.textTheme.body.copyWith(
fontSize: AboutUsConfig.dialogButtonFontSize,
),
),
onPressed: () {
Navigator.of(context).pop();
},
),
],
),
],
);
}
}

class _DialogContent extends StatelessWidget {
const _DialogContent({
required this.applicationName,
Expand Down
2 changes: 1 addition & 1 deletion lib/features/buildings_view/building_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "../../utils/context_extensions.dart";
import "../../widgets/wide_tile_card.dart";
import "controllers.dart";
import "model/building_model.dart";
import "utils.dart";
import "utils/utils.dart";

class BuildingTile extends ConsumerWidget {
const BuildingTile(
Expand Down
21 changes: 17 additions & 4 deletions lib/features/buildings_view/controllers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import "../map_view/controllers/bottom_sheet_controller.dart";
import "../map_view/controllers/controllers_set.dart";
import "../map_view/controllers/map_controller.dart";
import "../map_view/controllers/map_data_controller.dart";
import "./utils/building_codes_utils.dart";
import "model/building_model.dart";
import "repository/buildings_repository.dart";
import "utils.dart";
import "utils/utils.dart";

part "controllers.g.dart";

Expand Down Expand Up @@ -42,9 +43,21 @@ class BuildingsViewController extends _$BuildingsViewController

@override
bool filterMethod(BuildingModel item, String filterStr) {
return item.name.containsBuildingCode(filterStr) ||
item.addres.containsLowerCase(filterStr) ||
item.naturalName.containsLowerCase(filterStr);
switch (filterStr.length) {
case 0:
return true;
case 1:
if (ref.isStringABuildingCode(filterStr)) {
return item.name.containsBuildingCode(filterStr);
} else {
return item.addres.containsLowerCase(filterStr) ||
item.naturalName.containsLowerCase(filterStr);
}
default:
return item.name.containsBuildingCode(filterStr) ||
item.addres.containsLowerCase(filterStr) ||
item.naturalName.containsLowerCase(filterStr);
}
}
}

Expand Down
12 changes: 12 additions & 0 deletions lib/features/buildings_view/model/building_model.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "package:latlong2/latlong.dart";

import "../../../config/map_view_config.dart";
import "../../map_view/controllers/controllers_set.dart";
import "../repository/buildings_repository.dart";

Expand All @@ -21,4 +22,15 @@ class BuildingModel extends Building implements GoogleNavigable {

String? get addressFormatted =>
addres?.replaceFirst(",", "\n").replaceAll("\n ", "\n");

String? get parseBuildingCode {
final List<String> separatedBuildingName =
name.split(BuildingSearchConfig.buildingCodeSeperator);

if (separatedBuildingName.length < 2) {
return null;
} else {
return separatedBuildingName[0];
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "../../../../config/ttl_config.dart";
import "../../../api_base/query_adapter.dart";
import "../../../utils/ilist_nonempty.dart";
import "../model/building_model.dart";
import "../utils.dart";
import "../utils/utils.dart";
import "getBuildings.graphql.dart";

part "buildings_repository.g.dart";
Expand Down
27 changes: 27 additions & 0 deletions lib/features/buildings_view/utils/building_codes_utils.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import "package:fast_immutable_collections/fast_immutable_collections.dart";
import "package:flutter_riverpod/flutter_riverpod.dart";
import "package:riverpod_annotation/riverpod_annotation.dart";

import "../../../utils/contains_number.dart";
import "../repository/buildings_repository.dart";

part "building_codes_utils.g.dart";

@riverpod
Future<ISet<String>> allBuildingsCodesLowerCase(Ref ref) async {
final buildings = await ref.watch(buildingsRepositoryProvider.future);
return buildings
.map((e) => e.parseBuildingCode?.toLowerCase())
.whereType<String>()
.toISet();
}

extension IsStringABuildingCodeX on Ref {
bool isStringABuildingCode(String potentialBuildingCode) {
final allLowerCaseBuildingsCodes =
watch(allBuildingsCodesLowerCaseProvider).requireValue;
return allLowerCaseBuildingsCodes
.contains(potentialBuildingCode.toLowerCase()) ||
potentialBuildingCode.containsNumber();
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import "package:fast_immutable_collections/fast_immutable_collections.dart";
import "package:flutter/widgets.dart";

import "../../config/map_view_config.dart";
import "../../utils/contains_lower_case.dart";
import "../../utils/context_extensions.dart";
import "model/building_model.dart";
import "../../../config/map_view_config.dart";
import "../../../utils/contains_lower_case.dart";
import "../../../utils/context_extensions.dart";
import "../model/building_model.dart";

extension ContainsCaseUnsensitiveX on String? {
bool containsBuildingCode(String buildingCode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DepartmentDetailView extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final state = ref.watch(departmentDetailsRepositoryProvider(id));
return Scaffold(
appBar: DetailViewAppBar(title: context.localize.departments),
appBar: DetailViewAppBar(),
body: switch (state) {
AsyncError(:final error) => MyErrorWidget(error),
AsyncValue(:final DepartmentDetails value) => CustomScrollView(
Expand Down
1 change: 0 additions & 1 deletion lib/features/departments_view/departments_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class _DepartmentsView extends ConsumerWidget {
return Scaffold(
appBar: SearchBoxAppBar(
addLeadingPopButton: true,
leadingButtonTitle: context.localize.other_view,
context,
title: context.localize.departments,
onQueryChanged: ref
Expand Down
2 changes: 1 addition & 1 deletion lib/features/guide_detail_view/guide_detail_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class GuideDetailView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: DetailViewAppBar(title: context.localize.guide),
appBar: DetailViewAppBar(),
body: _GuideDetailDataView(id: id),
);
}
Expand Down
Loading

0 comments on commit 4966461

Please sign in to comment.