Skip to content

Commit

Permalink
fix: AccountScreen name
Browse files Browse the repository at this point in the history
  • Loading branch information
cevheri committed Dec 9, 2024
1 parent 795ac0e commit fa51943
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
4 changes: 3 additions & 1 deletion lib/main/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,18 @@ class App extends StatelessWidget {
routes: _initialRoutes,
);
}

@visibleForTesting
Map<String, WidgetBuilder> get initialRoutes => _initialRoutes;

final _initialRoutes = {
ApplicationRoutes.home: (context) {
return BlocProvider<AccountBloc>(
create: (context) => AccountBloc(repository: AccountRepository())..add(const AccountLoad()), child: HomeScreen());
},
ApplicationRoutes.account: (context) {
return BlocProvider<AccountBloc>(
create: (context) => AccountBloc(repository: AccountRepository())..add(const AccountLoad()), child: AccountsScreen());
create: (context) => AccountBloc(repository: AccountRepository())..add(const AccountLoad()), child: AccountScreen());
},
ApplicationRoutes.login: (context) {
return BlocProvider<LoginBloc>(create: (context) => LoginBloc(repository: LoginRepository()), child: LoginScreen());
Expand Down
4 changes: 2 additions & 2 deletions lib/presentation/screen/account/account_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import '../../../generated/l10n.dart';
import '../../common_blocs/account/account_bloc.dart';
import '../user/edit/edit_form_widget.dart';

class AccountsScreen extends StatelessWidget {
AccountsScreen({super.key});
class AccountScreen extends StatelessWidget {
AccountScreen({super.key});

final formKey = GlobalKey<FormBuilderState>();

Expand Down
20 changes: 14 additions & 6 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ packages:
dependency: transitive
description:
name: coverage
sha256: "4b03e11f6d5b8f6e5bb5e9f7889a56fe6c5cbe942da5378ea4d4d7f73ef9dfe5"
sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -532,6 +532,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.2"
go_router:
dependency: "direct main"
description:
name: go_router
sha256: "2fd11229f59e23e967b0775df8d5948a519cd7e1e8b6e849729e010587b46539"
url: "https://pub.dev"
source: hosted
version: "14.6.2"
graphs:
dependency: transitive
description:
Expand Down Expand Up @@ -813,10 +821,10 @@ packages:
dependency: transitive
description:
name: path_provider_foundation
sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16
sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
version: "2.4.1"
path_provider_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -965,10 +973,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_android
sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab"
sha256: "7f172d1b06de5da47b6264c2692ee2ead20bbbc246690427cdb4fc301cd0c549"
url: "https://pub.dev"
source: hosted
version: "2.3.3"
version: "2.3.4"
shared_preferences_foundation:
dependency: transitive
description:
Expand Down
10 changes: 6 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@ dependencies:
sdk: flutter
flutter_localizations:
sdk: flutter
flutter_bloc:
http:
go_router:
adaptive_theme:
cupertino_icons:
flutter_bloc:
equatable:

get:
intl:
pdf:
printing:
dart_json_mapper:
expansion_tile_card:
http:
device_preview:
getwidget:
flutter_form_builder: ^9.5.0
form_builder_validators: ^11.0.0
get:
intl:
string_2_icon:
intl_utils:
pattern_formatter:
Expand Down
6 changes: 3 additions & 3 deletions test/presentation/screen/account/account_screen_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void main() {
return GetMaterialApp(
home: MultiBlocProvider(
providers: blocs,
child: AccountsScreen(),
child: AccountScreen(),
),
localizationsDelegates: const [
S.delegate,
Expand All @@ -65,7 +65,7 @@ void main() {
expect(find.byType(AppBar), findsOneWidget);
// appBar title

expect(find.byType(AccountsScreen), findsOneWidget);
expect(find.byType(AccountScreen), findsOneWidget);
expect(find.text("Account"), findsOneWidget);
expect(find.byIcon(Icons.arrow_back), findsOneWidget);
_log.debug("end Validate AppBar");
Expand All @@ -86,7 +86,7 @@ void main() {
final backButtonFinder = find.byIcon(Icons.arrow_back);
await tester.tap(backButtonFinder);
await tester.pumpAndSettle();
expect(find.byType(AccountsScreen), findsNothing);
expect(find.byType(AccountScreen), findsNothing);

_log.debug("end Validate AppBar Back Button");
});
Expand Down

0 comments on commit fa51943

Please sign in to comment.