-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
592c392
commit cd1cd76
Showing
28 changed files
with
633 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:flutter_meedu/consumer.dart'; | ||
import 'package:flutter_meedu/notifiers.dart'; | ||
import 'package:flutter_meedu/providers.dart'; | ||
|
||
void main() {} | ||
|
||
class MyWidget extends ConsumerWidget { | ||
const MyWidget({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context, BuilderRef ref) { | ||
ref.watch( | ||
provider, | ||
); | ||
return const Placeholder(); | ||
} | ||
} | ||
|
||
final provider = Provider.state<CounterNotifier, int>( | ||
(ref) => CounterNotifier(0), | ||
); | ||
|
||
class CounterNotifier extends StateNotifier<int> { | ||
CounterNotifier(super.initialState); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.