File tree
Expand file treeCollapse file tree4 files changed
+33
-13
lines changed Expand file treeCollapse file tree4 files changed
+33
-13
lines changed Original file line number | Diff line number | Diff line change |
---|
|
1 | 1 | export 'utils.dart';
|
2 | 2 |
|
3 | 3 | import 'package:flutter/material.dart';
|
| 4 | +import 'package:flutter_riverpod/flutter_riverpod.dart'; |
4 | 5 |
|
5 |
| -class GoogleDocsApp extends StatelessWidget { |
| 6 | +class GoogleDocsApp extends ConsumerStatefulWidget { |
6 | 7 | const GoogleDocsApp({Key? key}) : super(key: key);
|
7 | 8 |
|
| 9 | +@override |
| 10 | +ConsumerState<ConsumerStatefulWidget> createState() => _GoogleDocsAppState(); |
| 11 | +} |
| 12 | + |
| 13 | +class _GoogleDocsAppState extends ConsumerState<GoogleDocsApp> { |
8 | 14 | @override
|
9 | 15 | Widget build(BuildContext context) {
|
10 |
| -return MaterialApp( |
11 |
| -title: 'Material App', |
12 |
| -home: Scaffold( |
13 |
| -appBar: AppBar( |
14 |
| -title: const Text('Material App Bar'), |
15 |
| -), |
16 |
| -body: const Center( |
17 |
| -child: Text('Hello World'), |
18 |
| -), |
19 |
| -), |
20 |
| -); |
| 16 | +return Container(); |
21 | 17 | }
|
22 | 18 | }
|
Original file line number | Diff line number | Diff line change |
---|
|
1 | 1 | import 'package:flutter/material.dart';
|
| 2 | +import 'package:flutter_riverpod/flutter_riverpod.dart'; |
2 | 3 | import 'package:google_docs_clone/app/app.dart';
|
3 | 4 |
|
4 | 5 | void main() {
|
5 | 6 | setupLogger();
|
6 | 7 |
|
7 |
| -runApp(const GoogleDocsApp()); |
| 8 | +runApp(const ProviderScope(child: GoogleDocsApp())); |
8 | 9 | }
|
Original file line number | Diff line number | Diff line change |
---|
@@ -69,6 +69,13 @@ packages:
|
69 | 69 | url: "https://pub.dartlang.org"
|
70 | 70 | source: hosted
|
71 | 71 | version: "1.0.4"
|
| 72 | +flutter_riverpod: |
| 73 | +dependency: "direct main" |
| 74 | +description: |
| 75 | +name: flutter_riverpod |
| 76 | +url: "https://pub.dartlang.org" |
| 77 | +source: hosted |
| 78 | +version: "1.0.3" |
72 | 79 | flutter_test:
|
73 | 80 | dependency: "direct dev"
|
74 | 81 | description: flutter
|
@@ -116,6 +123,13 @@ packages:
|
116 | 123 | url: "https://pub.dartlang.org"
|
117 | 124 | source: hosted
|
118 | 125 | version: "1.8.0"
|
| 126 | +riverpod: |
| 127 | +dependency: transitive |
| 128 | +description: |
| 129 | +name: riverpod |
| 130 | +url: "https://pub.dartlang.org" |
| 131 | +source: hosted |
| 132 | +version: "1.0.3" |
119 | 133 | sky_engine:
|
120 | 134 | dependency: transitive
|
121 | 135 | description: flutter
|
@@ -135,6 +149,13 @@ packages:
|
135 | 149 | url: "https://pub.dartlang.org"
|
136 | 150 | source: hosted
|
137 | 151 | version: "1.10.0"
|
| 152 | +state_notifier: |
| 153 | +dependency: transitive |
| 154 | +description: |
| 155 | +name: state_notifier |
| 156 | +url: "https://pub.dartlang.org" |
| 157 | +source: hosted |
| 158 | +version: "0.7.2+1" |
138 | 159 | stream_channel:
|
139 | 160 | dependency: transitive
|
140 | 161 | description:
|
@@ -179,3 +200,4 @@ packages:
|
179 | 200 | version: "2.1.1"
|
180 | 201 | sdks:
|
181 | 202 | dart: ">=2.16.1 <3.0.0"
|
| 203 | +flutter: ">=1.17.0" |
Original file line number | Diff line number | Diff line change |
---|
@@ -35,6 +35,7 @@ dependencies:
|
35 | 35 | # Use with the CupertinoIcons class for iOS style icons.
|
36 | 36 | cupertino_icons: ^1.0.2
|
37 | 37 | logging: ^1.0.2
|
| 38 | +flutter_riverpod: ^1.0.3 |
38 | 39 |
|
39 | 40 | dev_dependencies:
|
40 | 41 | flutter_test:
|
|
You can’t perform that action at this time.
0 commit comments