debug: app query
This commit is contained in:
parent
711b6bcbc8
commit
8aacd5064f
1 changed files with 59 additions and 46 deletions
|
@ -1,6 +1,7 @@
|
||||||
import 'package:aves/image_providers/app_icon_image_provider.dart';
|
import 'package:aves/image_providers/app_icon_image_provider.dart';
|
||||||
import 'package:aves/services/common/services.dart';
|
import 'package:aves/services/common/services.dart';
|
||||||
import 'package:aves/utils/android_file_utils.dart';
|
import 'package:aves/utils/android_file_utils.dart';
|
||||||
|
import 'package:aves/widgets/common/basic/query_bar.dart';
|
||||||
import 'package:aves/widgets/common/identity/aves_expansion_tile.dart';
|
import 'package:aves/widgets/common/identity/aves_expansion_tile.dart';
|
||||||
import 'package:aves/widgets/viewer/info/common.dart';
|
import 'package:aves/widgets/viewer/info/common.dart';
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
|
@ -15,6 +16,7 @@ class DebugAndroidAppSection extends StatefulWidget {
|
||||||
|
|
||||||
class _DebugAndroidAppSectionState extends State<DebugAndroidAppSection> with AutomaticKeepAliveClientMixin {
|
class _DebugAndroidAppSectionState extends State<DebugAndroidAppSection> with AutomaticKeepAliveClientMixin {
|
||||||
late Future<Set<Package>> _loader;
|
late Future<Set<Package>> _loader;
|
||||||
|
final ValueNotifier<String> _queryNotifier = ValueNotifier('');
|
||||||
|
|
||||||
static const iconSize = 20.0;
|
static const iconSize = 20.0;
|
||||||
|
|
||||||
|
@ -43,7 +45,15 @@ class _DebugAndroidAppSectionState extends State<DebugAndroidAppSection> with Au
|
||||||
final disabledTheme = enabledTheme.merge(const IconThemeData(opacity: .2));
|
final disabledTheme = enabledTheme.merge(const IconThemeData(opacity: .2));
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: packages.map((package) {
|
children: [
|
||||||
|
QueryBar(queryNotifier: _queryNotifier),
|
||||||
|
...packages.map((package) {
|
||||||
|
return ValueListenableBuilder<String>(
|
||||||
|
valueListenable: _queryNotifier,
|
||||||
|
builder: (context, query, child) {
|
||||||
|
if ({package.packageName, ...package.potentialDirs}.none((v) => v.contains(query))) {
|
||||||
|
return const SizedBox();
|
||||||
|
}
|
||||||
return Text.rich(
|
return Text.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
children: [
|
children: [
|
||||||
|
@ -89,7 +99,10 @@ class _DebugAndroidAppSectionState extends State<DebugAndroidAppSection> with Au
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}).toList(),
|
},
|
||||||
|
);
|
||||||
|
})
|
||||||
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue