|
|
@ -31,6 +31,7 @@ class MyApp extends StatelessWidget {
|
|
|
|
title: 'Background Isolate Channels',
|
|
|
|
title: 'Background Isolate Channels',
|
|
|
|
theme: ThemeData(
|
|
|
|
theme: ThemeData(
|
|
|
|
primarySwatch: Colors.blue,
|
|
|
|
primarySwatch: Colors.blue,
|
|
|
|
|
|
|
|
useMaterial3: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
home: const MyHomePage(title: 'Background Isolate Channels'),
|
|
|
|
home: const MyHomePage(title: 'Background Isolate Channels'),
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -124,26 +125,24 @@ class _MyHomePageState extends State<MyHomePage> {
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
appBar: AppBar(
|
|
|
|
appBar: AppBar(
|
|
|
|
title: Text(widget.title),
|
|
|
|
title: Text(widget.title),
|
|
|
|
),
|
|
|
|
bottom: PreferredSize(
|
|
|
|
body: Column(
|
|
|
|
preferredSize: const Size.fromHeight(kToolbarHeight),
|
|
|
|
children: [
|
|
|
|
child: Padding(
|
|
|
|
TextField(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
|
|
|
onChanged:
|
|
|
|
child: SearchBar(
|
|
|
|
_database == null ? null : (query) => _refresh(query: query),
|
|
|
|
hintText: 'Search',
|
|
|
|
decoration: const InputDecoration(
|
|
|
|
onChanged:
|
|
|
|
labelText: 'Search',
|
|
|
|
_database == null ? null : (query) => _refresh(query: query),
|
|
|
|
suffixIcon: Icon(Icons.search),
|
|
|
|
trailing: const [Icon(Icons.search), SizedBox(width: 8)],
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
|
|
|
return ListTile(title: Text(_entries![index]));
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemCount: _entries?.length ?? 0,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
body: ListView.builder(
|
|
|
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
|
|
|
return ListTile(title: Text(_entries![index]));
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemCount: _entries?.length ?? 0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
floatingActionButton: FloatingActionButton(
|
|
|
|
floatingActionButton: FloatingActionButton(
|
|
|
|
onPressed: _database == null ? null : _addDate,
|
|
|
|
onPressed: _database == null ? null : _addDate,
|
|
|
|