Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependencies #223

Merged
merged 2 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ jobs:
with:
# TODO: Set min_coverage to your desired value.
min_coverage: 0
setup: |
dart pub run build_runner build --delete-conflicting-outputs
# TODO: if you have a `build_runner` script, uncomment the following lines.
# setup: |
# dart pub run build_runner build --delete-conflicting-outputs
50 changes: 0 additions & 50 deletions lib/src/core/router/app_router_scope.dart

This file was deleted.

15 changes: 0 additions & 15 deletions lib/src/core/router/router.dart

This file was deleted.

6 changes: 0 additions & 6 deletions lib/src/feature/app/widget/app.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:sizzle_starter/src/core/router/app_router_scope.dart';
import 'package:sizzle_starter/src/core/widget/scope_widgets.dart';
import 'package:sizzle_starter/src/feature/app/widget/app_context.dart';
import 'package:sizzle_starter/src/feature/initialization/model/dependencies.dart';
Expand Down Expand Up @@ -31,11 +30,6 @@ class App extends StatelessWidget {
child: child,
),
),
ScopeProvider(
buildScope: (child) => AppRouterScope(
child: child,
),
),
],
child: const AppContext(),
);
Expand Down
21 changes: 9 additions & 12 deletions lib/src/feature/app/widget/app_context.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:sizzle_starter/src/core/localization/app_localization.dart';
import 'package:sizzle_starter/src/core/router/app_router_scope.dart';
import 'package:sizzle_starter/src/core/theme/color_schemes.dart';
import 'package:sizzle_starter/src/feature/sample/widget/sample_screen.dart';

/// A widget which is responsible for providing the app context.
class AppContext extends StatefulWidget {
Expand All @@ -13,15 +13,12 @@ class AppContext extends StatefulWidget {

class _AppContextState extends State<AppContext> {
@override
Widget build(BuildContext context) {
final router = AppRouterScope.of(context);
return MaterialApp.router(
routerConfig: router.config(),
supportedLocales: AppLocalization.supportedLocales,
localizationsDelegates: AppLocalization.localizationsDelegates,
theme: lightThemeData,
darkTheme: darkThemeData,
locale: const Locale('es'),
);
}
Widget build(BuildContext context) => MaterialApp(
supportedLocales: AppLocalization.supportedLocales,
localizationsDelegates: AppLocalization.localizationsDelegates,
theme: lightThemeData,
darkTheme: darkThemeData,
locale: const Locale('es'),
home: const SampleScreen(),
);
}
2 changes: 0 additions & 2 deletions lib/src/feature/sample/widget/sample_screen.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:sizzle_starter/src/core/utils/extensions/context_extension.dart';

/// {@template sample_page}
/// SamplePage widget
/// {@endtemplate}
@RoutePage()
class SampleScreen extends StatelessWidget {
/// {@macro sample_page}
const SampleScreen({super.key});
Expand Down
15 changes: 3 additions & 12 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: sizzle_starter
description: Your description
description: >
Highly scalable Flutter starter kit, designed with an optimal predefined structure
and inclusive of libraries that are widely applicable in numerous use cases.

# Prevent accidental publishing to pub.dev.
publish_to: "none"
Expand Down Expand Up @@ -30,13 +32,6 @@ dependencies:
# BLoC
flutter_bloc: 8.1.3

# Router
auto_route: 7.7.1

# Firebase
firebase_analytics: 10.4.4
firebase_core: 2.15.0

# Persisting
shared_preferences: 2.2.0

Expand Down Expand Up @@ -64,10 +59,6 @@ dev_dependencies:
flutter_test:
sdk: flutter

# Codegen
build_runner: 2.4.6
auto_route_generator: 7.2.0

# Lints
sizzle_lints: 1.0.10

Expand Down