first commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../api/category_api.dart';
|
||||
import '../models/category.dart';
|
||||
|
||||
/// 按类型加载分类:1=支出 2=收入
|
||||
final categoriesProvider =
|
||||
FutureProvider.autoDispose.family<List<Category>, int>((ref, type) {
|
||||
return ref.watch(categoryApiProvider).getCategories(type);
|
||||
});
|
||||
Reference in New Issue
Block a user