This commit is contained in:
cxc
2023-02-10 17:33:51 +08:00
parent bd259d8303
commit 5f5f2554eb
10 changed files with 100 additions and 38 deletions

View File

@ -0,0 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
class UniqueIdNotifier extends Notifier<UniqueKey> {
@override
UniqueKey build() {
return UniqueKey();
}
void updateId() {
state = UniqueKey();
}
}
final uniqueIdProvider =
NotifierProvider<UniqueIdNotifier, UniqueKey>(() => UniqueIdNotifier());