Skip to content

Commit eee294c

Browse files
committed
Update theme
1 parent a67dbe9 commit eee294c

File tree

15 files changed

+54
-65
lines changed

15 files changed

+54
-65
lines changed

README.md

Lines changed: 26 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# flutter_architecture_samples
22

3-
[![Build Status](https://github.com/brianegan/flutter_architecture_samples/actions/workflows/static_analysis_and_tests.yml/badge.svg?branch=master)](https://github.com/brianegan/flutter_architecture_samples/actions/workflows/static_analysis_and_tests.yml)
4-
[![codecov](https://codecov.io/gh/brianegan/flutter_architecture_samples/branch/master/graph/badge.svg)](https://codecov.io/gh/brianegan/flutter_architecture_samples)
3+
[![Build Status](https://github.com/brianegan/flutter_architecture_samples/actions/workflows/analyze_test_build.yml/badge.svg?branch=main)](https://github.com/brianegan/flutter_architecture_samples/actions/workflows/analyze_test_build.ymll)
4+
[![codecov](https://codecov.io/gh/brianegan/flutter_architecture_samples/branch/main/graph/badge.svg)](https://codecov.io/gh/brianegan/flutter_architecture_samples)
55

66
<img align="right" src="assets/todo-list.png" alt="List of Todos Screen">
77

@@ -17,35 +17,30 @@ The Flutter Architecture Samples project demonstrates strategies to help solve
1717
or avoid these common problems. This project implements the same app using
1818
different architectural concepts and tools.
1919

20-
You can use the samples in this project as a learning reference, or as a
21-
starting point for creating your own apps. The focus of this project is on
22-
demonstrating how to structure your code, design your architecture, and the
23-
eventual impact of adopting these patterns on testing and maintaining your app.
24-
You can use the techniques demonstrated here in many different ways to build
25-
apps. Your own particular priorities will impact how you implement the concepts
26-
in these projects, so you should not consider these samples to be canonical
27-
examples. To ensure the focus is kept on the aims described above, the app uses
28-
a simple UI.
20+
You can use the samples in this project as a learning reference, as a roughly
21+
apples-to-apples comparison of different approaches, or as a starting point for
22+
creating your own apps. The focus of this project is on demonstrating how to
23+
structure your code, design your architecture, and the eventual impact of
24+
adopting these patterns on testing and maintaining your app. You can use the
25+
techniques demonstrated here in many different ways to build apps. Your own
26+
particular priorities will impact how you implement the concepts in these
27+
projects, so you should not consider these samples to be canonical examples. To
28+
ensure the focus is kept on the aims described above, the app uses a simple UI.
2929

3030
### Current Samples
3131

32-
- [Vanilla Lifting State Up Example](vanilla) ([Web Demo](https://fas_vanilla.codemagic.app)) - Uses the tools Flutter provides out of the box to manage app state.
33-
- [InheritedWidget Example](inherited_widget) ([Web Demo](https://fas_inherited_widget.codemagic.app)) - Uses an InheritedWidget to pass app state down the widget hierarchy.
34-
- [Change Notifier + Provider Example](change_notifier_provider) ([Web Demo](https://fas_change_notifier_provider.codemagic.app)) - Uses the [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) class from Flutter with [provider](https://pub.dev/packages/provider) package now recommended by the Flutter team.
35-
- [BLoC Example](bloc_flutter) ([Web Demo](https://fas_bloc_flutter.codemagic.app)) - An implementation of the BLoC pattern, which uses Sinks for Inputs and Streams for Outputs
36-
- [Bloc Library Example](bloc_library) ([Web Demo](https://fas_bloc_library.codemagic.app)) - Uses the [bloc](https://pub.dartlang.org/packages/bloc) and [flutter_bloc](https://pub.dartlang.org/packages/flutter_bloc) libraries to manage app state and update Widgets.
37-
- [MobX Example](mobx) ([Web Demo](https://fas_mobx.codemagic.app)) - Uses the [MobX](https://pub.dev/packages/mobx) library to manage app state and update widgets using `Observables`, `Actions` and `Reactions`.
38-
- [Redux Example](redux) ([Web Demo](https://fas_redux.codemagic.app)) - Uses the [Redux](https://pub.dartlang.org/packages/redux) library to manage app state and update Widgets
39-
- ["Simple" BLoC Example](simple_bloc_flutter) ([Web Demo](https://fas_simple_bloc.codemagic.app)) - Similar to the BLoC pattern, but uses Functions for Inputs and Streams for Outputs. Results in far less code compared to standard BLoC.
40-
- [MVI Example](mvi_flutter) ([Web Demo](https://fas_mvi.codemagic.app)) - Uses the concepts from Cycle.JS and applies them to Flutter.
41-
- [states_rebuilder Example](states_rebuilder) ([Web Demo](https://fas_states_rebuilder.codemagic.app)) - Uses the [states_rebuilder](https://pub.dev/packages/states_rebuilder) library to manage app state and update Widgets.
42-
- [built_redux Example](built_redux) - Uses the [built_redux](https://pub.dartlang.org/packages/built_redux) library to enforce immutability and manage app state
43-
- [scoped_model Example](scoped_model) - Uses the [scoped_model](https://pub.dartlang.org/packages/scoped_model) library to hold app state and notify Widgets of Updates
44-
- [Firestore Redux Example](firestore_redux) - Uses the [Redux](https://pub.dartlang.org/packages/redux) library to manage app state and update Widgets and
45-
adds [Cloud_Firestore](https://firebase.google.com/docs/firestore/) as the Todos database.
46-
- [MVU Example](mvu) - Uses the [dartea](https://pub.dartlang.org/packages/dartea) library to manage app state and update Widgets.
47-
- [MVC Example](mvc) - Uses the [MVC](https://pub.dartlang.org/packages/mvc_pattern) library to implement the traditional MVC design pattern.
48-
- [Frideos Example](frideos_library) - Uses the [Frideos](https://pub.dartlang.org/packages/frideos) library to manage app state and update widgets using streams.
32+
- [Vanilla Lifting State Up Example](vanilla) ([Web Demo](https://fas-vanilla.netlify.app)) - Uses the tools Flutter provides out of the box to manage app state.
33+
- [InheritedWidget Example](inherited_widget) ([Web Demo](https://fas-inherited-widget.netlify.app)) - Uses an InheritedWidget to pass app state down the widget hierarchy.
34+
- [Change Notifier + Provider Example](change_notifier_provider) ([Web Demo](https://fas-change-notifier-provider.netlify.app/)) - Uses the [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) class from Flutter with [provider](https://pub.dev/packages/provider) package now recommended by the Flutter team.
35+
- [Freezed + Provider + Value Notifier](freezed_provider_value_notifier) ([Web Demo](https://fas-freezed-provider-value-notifier.netlify.app)) - Uses the [ValueNotifier](https://api.flutter.dev/flutter/foundation/ValueNotifier-class.html) class from Flutter with [provider](https://pub.dev/packages/provider) package.
36+
- [BLoC Example](bloc_flutter) ([Web Demo](https://fas-bloc-flutter.netlify.app/)) - An implementation of the original [BLoC pattern](https://www.youtube.com/watch?v=PLHln7wHgPE&list=PLOU2XLYxmsIIJr3vjxggY7yGcGO7i9BK5&index=13) described by Paolo Soares at DartConf 2018, which uses Sinks for Inputs and Streams for Outputs
37+
- [Bloc Library Example](bloc_library) ([Web Demo](https://fas-bloc-library.netlify.app)) - Uses the [bloc](https://pub.dartlang.org/packages/bloc) and [flutter_bloc](https://pub.dartlang.org/packages/flutter_bloc) libraries to manage app state and update Widgets.
38+
- [MobX Example](mobx) ([Web Demo](https://fas-mobx.netlify.app)) - Uses the [MobX](https://pub.dev/packages/mobx) library to manage app state and update widgets using `Observables`, `Actions` and `Reactions`.
39+
- [Redux Example](redux) ([Web Demo](https://fas-redux.netlify.app)) - Uses the [Redux](https://pub.dartlang.org/packages/redux) library to manage app state and update Widgets
40+
- ["Simple" BLoC Example](simple_bloc_flutter) ([Web Demo](https://fas-simple-bloc.netlify.app/)) - Similar to the BLoC pattern, but uses Functions for Inputs and Streams for Outputs. Results in far less code compared to original BLoC pattern if code sharing with AngularDart apps isn't an important use case for your app.
41+
- [Signals Example](signals) ([Web Demo](https://fas-signals.netlify.app)) - Uses the [Signals](https://pub.dev/packages/signals) package by [Rody Davis](https://pub.dev/publishers/rodydavis.com/packages).
42+
- [MVI Example](mvi_flutter) ([Web Demo](https://fas-mvi.netlify.app)) - Uses the concepts from [Cycle.JS](https://cycle.js.org/) and applies them to Flutter.
43+
- [scoped_model Example](scoped_model) ([Web Demo](https://fas-scoped-model.netlify.app)) - Uses the [scoped_model](https://pub.dartlang.org/packages/scoped_model) library to hold app state and notify Widgets of Updates
4944

5045
### Supporting Code
5146

@@ -59,37 +54,19 @@ window.localStorage for web projects.
5954
- [todos_repository_local_storage](todos_repository_local_storage) - Implements
6055
the todos repository using the file system, window.localStorage, and
6156
SharedPreferences as the data source.
62-
- [firebase_flutter_repository](firebase_flutter_repository) - Implements
63-
the todos repository using firestore as the data source.
64-
- [firebase_rtdb_flutter_repository](firebase_rtdb_flutter_repository) -
65-
Implements the todos repository using firebase real-time database as the data
66-
source.
6757

6858
### Running the samples
6959

70-
#### iOS / Android
71-
7260
```
7361
cd <sample_directory>
7462
flutter run
7563
```
7664

77-
#### Web
78-
79-
Make sure you're on Flutter version "Flutter 1.12.13+hotfix.6 • channel beta" or
80-
newer. Not all samples support web at this time, so please check the sample
81-
directory for a `lib/main_web.dart` file.
82-
83-
```
84-
cd <sample_directory>
85-
flutter run -d chrome -t lib/main_web.dart
86-
```
87-
8865
### Why a todo app?
8966

90-
The app in this project aims to be simple enough that you can understand it
91-
quickly, but complex enough to showcase difficult design decisions and testing
92-
scenarios. For more information, see the [app's specification](app_spec.md).
67+
The app in this project aims to be as simple as possible while still showcasing
68+
different design decisions and testing scenarios. For more information, see the
69+
[app's specification](app_spec.md).
9370

9471
### Be excellent to each other
9572

bloc_flutter/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BlocApp extends StatelessWidget {
2727
bloc: TodosListBloc(todosInteractor),
2828
child: MaterialApp(
2929
onGenerateTitle: (context) => BlocLocalizations.of(context).appTitle,
30-
theme: ArchSampleTheme.theme,
30+
theme: ArchSampleTheme.lightTheme,
3131
darkTheme: ArchSampleTheme.darkTheme,
3232
localizationsDelegates: [
3333
ArchSampleLocalizationsDelegate(),

bloc_library/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TodosApp extends StatelessWidget {
2121
child: MaterialApp(
2222
onGenerateTitle: (context) =>
2323
FlutterBlocLocalizations.of(context).appTitle,
24-
theme: ArchSampleTheme.theme,
24+
theme: ArchSampleTheme.lightTheme,
2525
darkTheme: ArchSampleTheme.darkTheme,
2626
localizationsDelegates: [
2727
ArchSampleLocalizationsDelegate(),

change_notifier_provider/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ProviderApp extends StatelessWidget {
1818
return ChangeNotifierProvider(
1919
create: (_) => TodoListModel(repository: repository)..loadTodos(),
2020
child: MaterialApp(
21-
theme: ArchSampleTheme.theme,
21+
theme: ArchSampleTheme.lightTheme,
2222
darkTheme: ArchSampleTheme.darkTheme,
2323
localizationsDelegates: [
2424
ArchSampleLocalizationsDelegate(),

freezed_provider_value_notifier/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ProviderApp extends StatelessWidget {
1818
return ValueNotifierProvider<TodoListController, TodoList>(
1919
create: (_) => TodoListController(todosRepository: repository),
2020
child: MaterialApp(
21-
theme: ArchSampleTheme.theme,
21+
theme: ArchSampleTheme.lightTheme,
2222
darkTheme: ArchSampleTheme.darkTheme,
2323
localizationsDelegates: [
2424
ArchSampleLocalizationsDelegate(),

inherited_widget/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class InheritedWidgetApp extends StatelessWidget {
1010
@override
1111
Widget build(BuildContext context) {
1212
return MaterialApp(
13-
theme: ArchSampleTheme.theme,
13+
theme: ArchSampleTheme.lightTheme,
1414
darkTheme: ArchSampleTheme.darkTheme,
1515
onGenerateTitle: (context) =>
1616
InheritedWidgetLocalizations.of(context).appTitle,

mobx/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MobxApp extends StatelessWidget {
2525
dispose: (_, store) => store.dispose(), // Clean up after we're done
2626
child: MaterialApp(
2727
initialRoute: ArchSampleRoutes.home,
28-
theme: ArchSampleTheme.theme,
28+
theme: ArchSampleTheme.lightTheme,
2929
darkTheme: ArchSampleTheme.darkTheme,
3030
localizationsDelegates: [
3131
MobxLocalizationsDelegate(),

mvi_flutter/lib/mvi_app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MviApp extends StatelessWidget {
2323
userInteractor: userInteractor,
2424
child: MaterialApp(
2525
onGenerateTitle: (context) => BlocLocalizations.of(context).appTitle,
26-
theme: ArchSampleTheme.theme,
26+
theme: ArchSampleTheme.lightTheme,
2727
darkTheme: ArchSampleTheme.darkTheme,
2828
localizationsDelegates: [
2929
ArchSampleLocalizationsDelegate(),

redux/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ReduxApp extends StatelessWidget {
1919
store: store,
2020
child: MaterialApp(
2121
onGenerateTitle: (context) => ReduxLocalizations.of(context).appTitle,
22-
theme: ArchSampleTheme.theme,
22+
theme: ArchSampleTheme.lightTheme,
2323
darkTheme: ArchSampleTheme.darkTheme,
2424
localizationsDelegates: [
2525
ArchSampleLocalizationsDelegate(),

scoped_model/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ScopedModelApp extends StatelessWidget {
1717
var app = MaterialApp(
1818
onGenerateTitle: (context) =>
1919
ScopedModelLocalizations.of(context).appTitle,
20-
theme: ArchSampleTheme.theme,
20+
theme: ArchSampleTheme.lightTheme,
2121
darkTheme: ArchSampleTheme.darkTheme,
2222
localizationsDelegates: [
2323
ArchSampleLocalizationsDelegate(),

0 commit comments

Comments
 (0)