opt: pages

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-15 23:26:27 +08:00
parent 5a69e6abb0
commit 3852e21571
13 changed files with 234 additions and 278 deletions

View File

@@ -111,21 +111,21 @@ class _FollowPageState extends State<FollowPage> {
}
}
class _FakeAPI {
static const List<String> _kOptions = <String>[
'aardvark',
'bobcat',
'chameleon',
];
// Searches the options, but injects a fake "network" delay.
static Future<Iterable<String>> search(String query) async {
await Future<void>.delayed(
const Duration(seconds: 1)); // Fake 1 second delay.
if (query == '') {
return const Iterable<String>.empty();
}
return _kOptions.where((String option) {
return option.contains(query.toLowerCase());
});
}
}
// class _FakeAPI {
// static const List<String> _kOptions = <String>[
// 'aardvark',
// 'bobcat',
// 'chameleon',
// ];
// // Searches the options, but injects a fake "network" delay.
// static Future<Iterable<String>> search(String query) async {
// await Future<void>.delayed(
// const Duration(seconds: 1)); // Fake 1 second delay.
// if (query == '') {
// return const Iterable<String>.empty();
// }
// return _kOptions.where((String option) {
// return option.contains(query.toLowerCase());
// });
// }
// }