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

update dependencies #286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion example/lib/app/app_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_modular/flutter_modular.dart';

class AppWidget extends StatelessWidget {
const AppWidget({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return MaterialApp.router(
Expand All @@ -11,4 +13,4 @@ class AppWidget extends StatelessWidget {
routeInformationParser: Modular.routeInformationParser,
);
}
}
}
18 changes: 9 additions & 9 deletions example/lib/app/modules/home/home_module.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import 'package:flutter_modular/flutter_modular.dart';
import 'home_store.dart';
import 'home_store.dart';

import 'home_page.dart';

class HomeModule extends Module {
@override
final List<Bind> binds = [
Bind.lazySingleton((i) => HomeStore()),
];
Bind.lazySingleton((i) => HomeStore()),
];

@override
final List<ModularRoute> routes = [
ChildRoute(Modular.initialRoute, child: (_, args) => HomePage()),
];
}
@override
final List<ModularRoute> routes = [
ChildRoute(Modular.initialRoute, child: (_, args) => const HomePage()),
];
}
10 changes: 5 additions & 5 deletions example/lib/app/modules/home/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ class HomePage extends StatefulWidget {
const HomePage({Key? key, this.title = 'Home'}) : super(key: key);

@override
_HomePageState createState() => _HomePageState();
State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {

late final HomeStore store;

@override
Expand All @@ -25,14 +24,15 @@ class _HomePageState extends State<HomePage> {
void dispose() {
Modular.dispose<HomeStore>();
super.dispose();
}
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Counter'),
),
body: ScopedBuilder<HomeStore, Exception, int>(
body: ScopedBuilder<HomeStore, int>(
store: store,
onState: (_, counter) {
return Padding(
Expand All @@ -55,4 +55,4 @@ class _HomePageState extends State<HomePage> {
),
);
}
}
}
4 changes: 2 additions & 2 deletions example/lib/app/modules/home/home_store.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter_triple/flutter_triple.dart';

class HomeStore extends NotifierStore<Exception, int> {
class HomeStore extends Store<int> {
HomeStore() : super(0);

Future<void> increment() async {
Expand All @@ -17,4 +17,4 @@ class HomeStore extends NotifierStore<Exception, int> {

setLoading(false);
}
}
}
3 changes: 2 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ import 'package:flutter_modular/flutter_modular.dart';
import 'app/app_module.dart';
import 'app/app_widget.dart';

void main() => runApp(ModularApp(module: AppModule(), child: AppWidget()));
void main() =>
runApp(ModularApp(module: AppModule(), child: const AppWidget()));
12 changes: 6 additions & 6 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter_modular: ^5.0.3
flutter_triple: ^1.2.7+4
flutter_triple: ^2.0.1
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
rx_notifier: ^1.1.0
rx_notifier: ^2.2.2
mobx: ^2.0.7
flutter_mobx: ^2.0.5
flutter_bloc: 8.0.1
flutter_bloc: ^8.1.2
rxdart: ^0.27.3
triple: ^1.5.0+1
triple: ^2.0.1

dev_dependencies:
modular_test: ^2.0.0
flutter_test:
sdk: flutter
triple_test: ^1.0.0+1
triple_test: ^2.0.0
mobx_codegen: ^2.0.6
bloc_test: 9.0.3
bloc_test: ^9.1.1
flutter:
uses-material-design: true
scripts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ main: |
import 'app/app_module.dart';
import 'app/app_widget.dart';

void main() => runApp(ModularApp(module: AppModule(), child: AppWidget()));
void main() => runApp(ModularApp(module: AppModule(), child: const AppWidget()));

app_module: |
import 'package:flutter_modular/flutter_modular.dart';
Expand All @@ -31,7 +31,9 @@ app_widget: |
import 'package:flutter_modular/flutter_modular.dart';

class AppWidget extends StatelessWidget {
@override
const AppWidget({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return MaterialApp.router(
title: 'Flutter Slidy',
Expand All @@ -50,7 +52,7 @@ home_page: |
const HomePage({Key? key, this.title = 'Home'}) : super(key: key);

@override
_HomePageState createState() => _HomePageState();
State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
Expand Down Expand Up @@ -78,7 +80,7 @@ home_module: |

@override
final List<ModularRoute> routes = [
ChildRoute(Modular.initialRoute, child: (_, args) => HomePage()),
ChildRoute(Modular.initialRoute, child: (_, args) => const HomePage()),
];
}

Expand Down Expand Up @@ -150,10 +152,11 @@ home_page_cubit: |

class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {

final CounterCubit _counterCubit = Modular.get();

@override
Expand Down Expand Up @@ -245,13 +248,13 @@ rx_dart: |
triple: |
import 'package:flutter_triple/flutter_triple.dart';

class HomeStore extends NotifierStore<Exception, int> {
class HomeStore extends Store<int> {
HomeStore() : super(0);

Future<void> increment() async {
setLoading(true);

await Future.delayed(Duration(seconds: 1));
await Future.delayed(const Duration(seconds: 1));

int value = state + 1;
if (value < 5) {
Expand All @@ -275,7 +278,7 @@ home_page_triple: |
const HomePage({Key? key, this.title = 'Home'}) : super(key: key);

@override
_HomePageState createState() => _HomePageState();
State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
Expand All @@ -297,17 +300,17 @@ home_page_triple: |
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Counter'),
title: const Text('Counter'),
),
body: ScopedBuilder<HomeStore, Exception, int>(
body: ScopedBuilder<HomeStore, int>(
store: store,
onState: (_, counter) {
return Padding(
padding: EdgeInsets.all(10),
padding: const EdgeInsets.all(10),
child: Text('\$counter'),
);
},
onError: (context, error) => Center(
onError: (context, error) => const Center(
child: Text(
'Too many clicks',
style: TextStyle(color: Colors.red),
Expand All @@ -318,7 +321,7 @@ home_page_triple: |
onPressed: () {
store.increment();
},
child: Icon(Icons.add),
child: const Icon(Icons.add),
),
);
}
Expand All @@ -338,7 +341,7 @@ home_module_triple: |

@override
final List<ModularRoute> routes = [
ChildRoute(Modular.initialRoute, child: (_, args) => HomePage()),
ChildRoute(Modular.initialRoute, child: (_, args) => const HomePage()),
];
}

Expand All @@ -353,7 +356,7 @@ home_page_mobx: |
const HomePage({Key? key, this.title = 'Home'}) : super(key: key);

@override
_HomePageState createState() => _HomePageState();
State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
Expand Down Expand Up @@ -399,7 +402,7 @@ home_module_mobx: |

@override
final List<ModularRoute> routes = [
ChildRoute(Modular.initialRoute, child: (_, args) => HomePage()),
ChildRoute(Modular.initialRoute, child: (_, args) => const HomePage()),
];
}

Expand All @@ -413,7 +416,7 @@ home_page_rx_dart: |
const HomePage({Key? key, this.title = 'Home'}) : super(key: key);

@override
_HomePageState createState() => _HomePageState();
State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
Expand Down Expand Up @@ -460,7 +463,7 @@ home_module_rx_dart: |

@override
final List<ModularRoute> routes = [
ChildRoute(Modular.initialRoute, child: (_, args) => HomePage()),
ChildRoute(Modular.initialRoute, child: (_, args) => const HomePage()),
];
}
''';
Expand Down
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ dependencies:
collection: ^1.14.11
meta: ^1.1.8
source_span: ^1.7.0
fhir_yaml: ^0.4.0
rxdart: ^0.26.0
fhir_yaml: ^0.9.0
rxdart: ^0.27.7
io: ^1.0.0
fpdart: ^0.2.0
fpdart: ^0.5.0
pub_api_client: ^2.2.1
modular_core: ^2.0.3+1


dev_dependencies:
build_runner: ^2.0.1
build_runner: ^2.3.3
build_version: ^2.0.3
test: ^1.16.0-nullsafety.17
mocktail: ^0.1.1
mocktail: ^0.3.0
build_test: ^2.1.0
cli_pkg: ^2.1.4
grinder: ^0.9.2
Expand Down