added legal state bar content

This commit is contained in:
2024-03-26 20:50:57 +01:00
parent a718e02827
commit 10b0c59c3f
7 changed files with 155 additions and 34 deletions

12
lib/util/watchState.dart Normal file
View File

@@ -0,0 +1,12 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class WatchState<T> extends StatelessWidget {
final Widget Function(BuildContext context, T state) child;
const WatchState(this.child, {super.key});
@override
Widget build(BuildContext context) {
return Consumer<T>(builder: (BuildContext context, T value, Widget? child) => this.child(context, value));
}
}