Skip to content

Instantly share code, notes, and snippets.

View hansbak's full-sized avatar

Hans Bakker hansbak

View GitHub Profile
@hansbak
hansbak / provider.dart
Created February 6, 2024 06:07
define the provider
// in your startup main.dart file
RestClient(await buildDioClient())
RepositoryProvider(create: (context) => restClient, child: ....
// The class preceding the statefull class with the dropdown search
class AssetDialog extends StatelessWidget {
final Asset asset;
const AssetDialog(this.asset, {super.key});
@override
Widget build(BuildContext context) {