removed noisy const
This commit is contained in:
parent
c7670b9ccf
commit
d715d628be
51 changed files with 282 additions and 282 deletions
|
@ -45,10 +45,10 @@ class _AvesAppState extends State<AvesApp> {
|
|||
scaffoldBackgroundColor: Colors.grey[900],
|
||||
buttonColor: accentColor,
|
||||
toggleableActiveColor: accentColor,
|
||||
tooltipTheme: const TooltipThemeData(
|
||||
tooltipTheme: TooltipThemeData(
|
||||
verticalOffset: 32,
|
||||
),
|
||||
appBarTheme: const AppBarTheme(
|
||||
appBarTheme: AppBarTheme(
|
||||
textTheme: TextTheme(
|
||||
headline6: TextStyle(
|
||||
fontSize: 20,
|
||||
|
@ -61,9 +61,9 @@ class _AvesAppState extends State<AvesApp> {
|
|||
home: FutureBuilder<void>(
|
||||
future: _appSetup,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return const Icon(AIcons.error);
|
||||
if (snapshot.connectionState != ConnectionState.done) return const Scaffold();
|
||||
return settings.hasAcceptedTerms ? const HomePage() : const WelcomePage();
|
||||
if (snapshot.hasError) return Icon(AIcons.error);
|
||||
if (snapshot.connectionState != ConnectionState.done) return Scaffold();
|
||||
return settings.hasAcceptedTerms ? HomePage() : WelcomePage();
|
||||
},
|
||||
),
|
||||
);
|
||||
|
|
|
@ -177,7 +177,7 @@ class CollectionLens with ChangeNotifier, CollectionActivityMixin, CollectionSel
|
|||
final va = androidFileUtils.getStorageVolume(a)?.path ?? '';
|
||||
final vb = androidFileUtils.getStorageVolume(b)?.path ?? '';
|
||||
return compareAsciiUpperCase(va, vb);
|
||||
};
|
||||
}
|
||||
sections = SplayTreeMap.of(byAlbum, compare);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ class CollectionSource with SourceBase, AlbumMixin, LocationMixin, TagMixin {
|
|||
_rawEntries.addAll(entries);
|
||||
addFolderPath(_rawEntries.map((entry) => entry.directory));
|
||||
invalidateFilterEntryCounts();
|
||||
eventBus.fire(const EntryAddedEvent());
|
||||
eventBus.fire(EntryAddedEvent());
|
||||
}
|
||||
|
||||
void removeEntries(Iterable<ImageEntry> entries) {
|
||||
|
|
|
@ -47,7 +47,7 @@ class MetadataService {
|
|||
debugPrint('getCatalogMetadata failed with code=${e.code}, exception=${e.message}, details=${e.details}');
|
||||
}
|
||||
return null;
|
||||
};
|
||||
}
|
||||
return background
|
||||
? servicePolicy.call(
|
||||
call,
|
||||
|
|
|
@ -20,7 +20,7 @@ extension ExtraDateTime on DateTime {
|
|||
|
||||
bool get isToday => isAtSameDayAs(DateTime.now());
|
||||
|
||||
bool get isYesterday => isAtSameDayAs(DateTime.now().subtract(const Duration(days: 1)));
|
||||
bool get isYesterday => isAtSameDayAs(DateTime.now().subtract(Duration(days: 1)));
|
||||
|
||||
bool get isThisMonth => isAtSameMonthAs(DateTime.now());
|
||||
|
||||
|
|
|
@ -11,20 +11,20 @@ class AboutPage extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('About'),
|
||||
title: Text('About'),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: AnimationLimiter(
|
||||
child: CustomScrollView(
|
||||
slivers: [
|
||||
SliverPadding(
|
||||
padding: const EdgeInsets.only(top: 16),
|
||||
padding: EdgeInsets.only(top: 16),
|
||||
sliver: SliverList(
|
||||
delegate: SliverChildListDelegate(
|
||||
[
|
||||
AppReference(),
|
||||
const SizedBox(height: 16),
|
||||
const Divider(),
|
||||
SizedBox(height: 16),
|
||||
Divider(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -92,7 +92,7 @@ class _AppReferenceState extends State<AppReference> {
|
|||
children: [
|
||||
WidgetSpan(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.only(end: 4),
|
||||
padding: EdgeInsetsDirectional.only(end: 4),
|
||||
child: FlutterLogo(
|
||||
size: style.fontSize * 1.25,
|
||||
),
|
||||
|
|
|
@ -39,7 +39,7 @@ class _LicensesState extends State<Licenses> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SliverPadding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
sliver: SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
|
@ -69,7 +69,7 @@ class _LicensesState extends State<Licenses> {
|
|||
return Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: 8),
|
||||
padding: EdgeInsetsDirectional.only(start: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
|
@ -95,13 +95,13 @@ class _LicensesState extends State<Licenses> {
|
|||
setState(() {});
|
||||
},
|
||||
tooltip: 'Sort',
|
||||
icon: const Icon(AIcons.sort),
|
||||
icon: Icon(AIcons.sort),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const Padding(
|
||||
SizedBox(height: 8),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Text('The following sets forth attribution notices for third party software that may be contained in this application.'),
|
||||
),
|
||||
|
@ -122,17 +122,17 @@ class LicenseRow extends StatelessWidget {
|
|||
final subColor = bodyTextStyle.color.withOpacity(.6);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 16),
|
||||
padding: EdgeInsets.only(top: 16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
LinkChip(
|
||||
text: package.name,
|
||||
url: package.sourceUrl,
|
||||
textStyle: const TextStyle(fontWeight: FontWeight.bold),
|
||||
textStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: 16),
|
||||
padding: EdgeInsetsDirectional.only(start: 16),
|
||||
child: LinkChip(
|
||||
text: package.license,
|
||||
url: package.licenseUrl,
|
||||
|
|
|
@ -144,7 +144,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
|
|||
// so that we can also detect taps around the title `Text`
|
||||
child: Container(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
padding: const EdgeInsets.symmetric(horizontal: NavigationToolbar.kMiddleSpacing),
|
||||
padding: EdgeInsets.symmetric(horizontal: NavigationToolbar.kMiddleSpacing),
|
||||
color: Colors.transparent,
|
||||
height: kToolbarHeight,
|
||||
child: title,
|
||||
|
@ -166,7 +166,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
|
|||
return [
|
||||
if (collection.isBrowsing)
|
||||
IconButton(
|
||||
icon: const Icon(AIcons.search),
|
||||
icon: Icon(AIcons.search),
|
||||
onPressed: _goToSearch,
|
||||
),
|
||||
if (collection.isSelecting)
|
||||
|
@ -190,15 +190,15 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
|
|||
if (collection.isBrowsing) ...[
|
||||
if (AvesApp.mode == AppMode.main)
|
||||
if (kDebugMode)
|
||||
const PopupMenuItem(
|
||||
PopupMenuItem(
|
||||
value: CollectionAction.refresh,
|
||||
child: MenuRow(text: 'Refresh', icon: AIcons.refresh),
|
||||
),
|
||||
const PopupMenuItem(
|
||||
PopupMenuItem(
|
||||
value: CollectionAction.select,
|
||||
child: MenuRow(text: 'Select', icon: AIcons.select),
|
||||
),
|
||||
const PopupMenuItem(
|
||||
PopupMenuItem(
|
||||
value: CollectionAction.stats,
|
||||
child: MenuRow(text: 'Stats', icon: AIcons.stats),
|
||||
),
|
||||
|
@ -207,27 +207,27 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
|
|||
PopupMenuItem(
|
||||
value: CollectionAction.copy,
|
||||
enabled: hasSelection,
|
||||
child: const MenuRow(text: 'Copy to album'),
|
||||
child: MenuRow(text: 'Copy to album'),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: CollectionAction.move,
|
||||
enabled: hasSelection,
|
||||
child: const MenuRow(text: 'Move to album'),
|
||||
child: MenuRow(text: 'Move to album'),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: CollectionAction.refreshMetadata,
|
||||
enabled: hasSelection,
|
||||
child: const MenuRow(text: 'Refresh metadata'),
|
||||
child: MenuRow(text: 'Refresh metadata'),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
const PopupMenuItem(
|
||||
PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
value: CollectionAction.selectAll,
|
||||
child: MenuRow(text: 'Select all'),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: CollectionAction.selectNone,
|
||||
enabled: hasSelection,
|
||||
child: const MenuRow(text: 'Select none'),
|
||||
child: MenuRow(text: 'Select none'),
|
||||
),
|
||||
]
|
||||
];
|
||||
|
@ -252,7 +252,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
|
|||
value: CollectionAction.sortByName,
|
||||
child: MenuRow(text: 'Sort by name', checked: collection.sortFactor == SortFactor.name),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuDivider(),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
|
|||
value: CollectionAction.groupByDay,
|
||||
child: MenuRow(text: 'Group by day', checked: collection.groupFactor == GroupFactor.day),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuDivider(),
|
||||
]
|
||||
: [];
|
||||
}
|
||||
|
|
|
@ -24,10 +24,10 @@ class EmptyContent extends StatelessWidget {
|
|||
size: 64,
|
||||
color: color,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
text,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
color: color,
|
||||
fontSize: 22,
|
||||
fontFamily: 'Concourse',
|
||||
|
|
|
@ -18,7 +18,7 @@ class FilterBar extends StatefulWidget implements PreferredSizeWidget {
|
|||
super(key: key);
|
||||
|
||||
@override
|
||||
final Size preferredSize = const Size.fromHeight(preferredHeight);
|
||||
final Size preferredSize = Size.fromHeight(preferredHeight);
|
||||
|
||||
@override
|
||||
_FilterBarState createState() => _FilterBarState();
|
||||
|
@ -85,8 +85,8 @@ class _FilterBarState extends State<FilterBar> {
|
|||
key: _animatedListKey,
|
||||
initialItemCount: widget.filters.length,
|
||||
scrollDirection: Axis.horizontal,
|
||||
physics: const BouncingScrollPhysics(),
|
||||
padding: const EdgeInsets.only(left: 8),
|
||||
physics: BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.only(left: 8),
|
||||
itemBuilder: (context, index, animation) {
|
||||
if (index >= widget.filters.length) return null;
|
||||
return _buildChip(widget.filters.toList()[index]);
|
||||
|
@ -98,7 +98,7 @@ class _FilterBarState extends State<FilterBar> {
|
|||
|
||||
Padding _buildChip(CollectionFilter filter) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 8),
|
||||
padding: EdgeInsets.only(right: 8),
|
||||
child: Center(
|
||||
child: AvesFilterChip(
|
||||
key: ValueKey(filter),
|
||||
|
|
|
@ -29,7 +29,7 @@ class AlbumSectionHeader extends StatelessWidget {
|
|||
leading: albumIcon,
|
||||
title: albumName,
|
||||
trailing: androidFileUtils.isOnRemovableStorage(folderPath)
|
||||
? const Icon(
|
||||
? Icon(
|
||||
AIcons.removableStorage,
|
||||
size: 16,
|
||||
color: Color(0xFF757575),
|
||||
|
|
|
@ -54,7 +54,7 @@ class SectionHeader extends StatelessWidget {
|
|||
height: height,
|
||||
child: header,
|
||||
)
|
||||
: const SizedBox.shrink();
|
||||
: SizedBox.shrink();
|
||||
}
|
||||
|
||||
Widget _buildAlbumSectionHeader() {
|
||||
|
@ -128,7 +128,7 @@ class TitleSectionHeader extends StatelessWidget {
|
|||
return Container(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
padding: padding,
|
||||
constraints: const BoxConstraints(minHeight: leadingDimension),
|
||||
constraints: BoxConstraints(minHeight: leadingDimension),
|
||||
child: GestureDetector(
|
||||
onTap: () => _toggleSectionSelection(context),
|
||||
child: Text.rich(
|
||||
|
@ -213,12 +213,12 @@ class SectionSelectableLeading extends StatelessWidget {
|
|||
),
|
||||
child: IconButton(
|
||||
iconSize: 26,
|
||||
padding: const EdgeInsets.only(top: 1),
|
||||
padding: EdgeInsets.only(top: 1),
|
||||
alignment: Alignment.topLeft,
|
||||
icon: Icon(selected ? AIcons.selected : AIcons.unselected),
|
||||
onPressed: onPressed,
|
||||
tooltip: selected ? 'Deselect section' : 'Select section',
|
||||
constraints: const BoxConstraints(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: leadingDimension,
|
||||
minWidth: leadingDimension,
|
||||
),
|
||||
|
@ -236,7 +236,7 @@ class SectionSelectableLeading extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
)
|
||||
: browsingBuilder?.call(context) ?? const SizedBox(height: leadingDimension);
|
||||
: browsingBuilder?.call(context) ?? SizedBox(height: leadingDimension);
|
||||
return AnimatedSwitcher(
|
||||
duration: Durations.sectionHeaderAnimation,
|
||||
switchInCurve: Curves.easeInOut,
|
||||
|
|
|
@ -109,7 +109,7 @@ class SectionedListLayoutProvider extends StatelessWidget {
|
|||
sectionKey: sectionKey,
|
||||
height: headerExtent,
|
||||
)
|
||||
: const SizedBox.shrink();
|
||||
: SizedBox.shrink();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class CollectionListSliver extends StatelessWidget {
|
|||
(context, index) {
|
||||
if (index >= childCount) return null;
|
||||
final sectionLayout = sectionLayouts.firstWhere((section) => section.hasChild(index), orElse: () => null);
|
||||
return sectionLayout?.builder(context, index) ?? const SizedBox.shrink();
|
||||
return sectionLayout?.builder(context, index) ?? SizedBox.shrink();
|
||||
},
|
||||
childCount: childCount,
|
||||
addAutomaticKeepAlives: false,
|
||||
|
|
|
@ -192,7 +192,7 @@ class _ScaleOverlayState extends State<ScaleOverlay> {
|
|||
],
|
||||
),
|
||||
)
|
||||
: const BoxDecoration(
|
||||
: BoxDecoration(
|
||||
// provide dummy gradient to lerp to the other one during animation
|
||||
gradient: RadialGradient(
|
||||
colors: [
|
||||
|
|
|
@ -23,7 +23,7 @@ class ExpandableFilterRow extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (filters.isEmpty) return const SizedBox.shrink();
|
||||
if (filters.isEmpty) return SizedBox.shrink();
|
||||
|
||||
final hasTitle = title != null && title.isNotEmpty;
|
||||
|
||||
|
@ -32,7 +32,7 @@ class ExpandableFilterRow extends StatelessWidget {
|
|||
Widget titleRow;
|
||||
if (hasTitle) {
|
||||
titleRow = Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
|
@ -52,7 +52,7 @@ class ExpandableFilterRow extends StatelessWidget {
|
|||
final filtersList = filters.toList();
|
||||
final wrap = Container(
|
||||
key: ValueKey('wrap$title'),
|
||||
padding: const EdgeInsets.symmetric(horizontal: horizontalPadding),
|
||||
padding: EdgeInsets.symmetric(horizontal: horizontalPadding),
|
||||
// specify transparent as a workaround to prevent
|
||||
// chip border clipping when the floating app bar is fading
|
||||
color: Colors.transparent,
|
||||
|
@ -75,8 +75,8 @@ class ExpandableFilterRow extends StatelessWidget {
|
|||
height: AvesFilterChip.minChipHeight,
|
||||
child: ListView.separated(
|
||||
scrollDirection: Axis.horizontal,
|
||||
physics: const BouncingScrollPhysics(),
|
||||
padding: const EdgeInsets.symmetric(horizontal: horizontalPadding),
|
||||
physics: BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.symmetric(horizontal: horizontalPadding),
|
||||
itemBuilder: (context, index) {
|
||||
if (index >= filtersList.length) return null;
|
||||
final filter = filtersList[index];
|
||||
|
@ -85,7 +85,7 @@ class ExpandableFilterRow extends StatelessWidget {
|
|||
onPressed: onPressed,
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) => const SizedBox(width: 8),
|
||||
separatorBuilder: (context, index) => SizedBox(width: 8),
|
||||
itemCount: filtersList.length,
|
||||
),
|
||||
);
|
||||
|
|
|
@ -44,7 +44,7 @@ class ImageSearchDelegate extends SearchDelegate<CollectionFilter> {
|
|||
return [
|
||||
if (query.isNotEmpty)
|
||||
IconButton(
|
||||
icon: const Icon(AIcons.clear),
|
||||
icon: Icon(AIcons.clear),
|
||||
onPressed: () {
|
||||
query = '';
|
||||
showSuggestions(context);
|
||||
|
@ -63,7 +63,7 @@ class ImageSearchDelegate extends SearchDelegate<CollectionFilter> {
|
|||
valueListenable: expandedSectionNotifier,
|
||||
builder: (context, expandedSection, child) {
|
||||
return ListView(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
padding: EdgeInsets.only(top: 8),
|
||||
children: [
|
||||
_buildFilterRow(
|
||||
context: context,
|
||||
|
@ -135,7 +135,7 @@ class ImageSearchDelegate extends SearchDelegate<CollectionFilter> {
|
|||
// and possibly trigger a rebuild here
|
||||
_select(context, _buildQueryFilter(true));
|
||||
});
|
||||
return const SizedBox.shrink();
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
|
||||
QueryFilter _buildQueryFilter(bool colorful) {
|
||||
|
|
|
@ -75,7 +75,7 @@ class ThumbnailSelectionOverlay extends StatelessWidget {
|
|||
icon: selected ? AIcons.selected : AIcons.unselected,
|
||||
size: iconSize,
|
||||
)
|
||||
: const SizedBox.shrink();
|
||||
: SizedBox.shrink();
|
||||
child = AnimatedSwitcher(
|
||||
duration: duration,
|
||||
switchInCurve: Curves.easeOutBack,
|
||||
|
@ -95,7 +95,7 @@ class ThumbnailSelectionOverlay extends StatelessWidget {
|
|||
return child;
|
||||
},
|
||||
)
|
||||
: const SizedBox.shrink();
|
||||
: SizedBox.shrink();
|
||||
return AnimatedSwitcher(
|
||||
duration: duration,
|
||||
child: child,
|
||||
|
|
|
@ -81,7 +81,7 @@ class _ThumbnailRasterImageState extends State<ThumbnailRasterImage> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final fastImage = Image(
|
||||
key: const ValueKey('LQ'),
|
||||
key: ValueKey('LQ'),
|
||||
image: _fastThumbnailProvider,
|
||||
width: extent,
|
||||
height: extent,
|
||||
|
@ -90,7 +90,7 @@ class _ThumbnailRasterImageState extends State<ThumbnailRasterImage> {
|
|||
final image = _sizedThumbnailProvider == null
|
||||
? fastImage
|
||||
: Image(
|
||||
key: const ValueKey('HQ'),
|
||||
key: ValueKey('HQ'),
|
||||
frameBuilder: (context, child, frame, wasSynchronouslyLoaded) {
|
||||
if (wasSynchronouslyLoaded) return child;
|
||||
return AnimatedSwitcher(
|
||||
|
|
|
@ -36,7 +36,7 @@ class ThumbnailCollection extends StatelessWidget {
|
|||
final mqSize = mq.item1;
|
||||
final mqHorizontalPadding = mq.item2;
|
||||
|
||||
if (mqSize.isEmpty) return const SizedBox.shrink();
|
||||
if (mqSize.isEmpty) return SizedBox.shrink();
|
||||
|
||||
TileExtentManager.applyTileExtent(mqSize, mqHorizontalPadding, _tileExtentNotifier);
|
||||
final cacheExtent = TileExtentManager.extentMaxForSize(mqSize) * 2;
|
||||
|
@ -159,7 +159,7 @@ class _CollectionScrollViewState extends State<CollectionScrollView> {
|
|||
primary: true,
|
||||
// workaround to prevent scrolling the app bar away
|
||||
// when there is no content and we use `SliverFillRemaining`
|
||||
physics: collection.isEmpty ? const NeverScrollableScrollPhysics() : const SloppyScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
|
||||
physics: collection.isEmpty ? NeverScrollableScrollPhysics() : SloppyScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
|
||||
cacheExtent: widget.cacheExtent,
|
||||
slivers: [
|
||||
appBar,
|
||||
|
@ -168,7 +168,7 @@ class _CollectionScrollViewState extends State<CollectionScrollView> {
|
|||
child: _buildEmptyCollectionPlaceholder(collection),
|
||||
hasScrollBody: false,
|
||||
)
|
||||
: const CollectionListSliver(),
|
||||
: CollectionListSliver(),
|
||||
SliverToBoxAdapter(
|
||||
child: Selector<MediaQueryData, double>(
|
||||
selector: (context, mq) => mq.viewInsets.bottom,
|
||||
|
@ -211,22 +211,22 @@ class _CollectionScrollViewState extends State<CollectionScrollView> {
|
|||
valueListenable: collection.source.stateNotifier,
|
||||
builder: (context, sourceState, child) {
|
||||
if (sourceState == SourceState.loading) {
|
||||
return const SizedBox.shrink();
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
if (collection.filters.any((filter) => filter is FavouriteFilter)) {
|
||||
return const EmptyContent(
|
||||
return EmptyContent(
|
||||
icon: AIcons.favourite,
|
||||
text: 'No favourites',
|
||||
);
|
||||
}
|
||||
debugPrint('collection.filters=${collection.filters}');
|
||||
if (collection.filters.any((filter) => filter is MimeFilter && filter.mime == MimeTypes.anyVideo)) {
|
||||
return const EmptyContent(
|
||||
return EmptyContent(
|
||||
icon: AIcons.video,
|
||||
text: 'No videos',
|
||||
);
|
||||
}
|
||||
return const EmptyContent(
|
||||
return EmptyContent(
|
||||
icon: AIcons.image,
|
||||
text: 'No images',
|
||||
);
|
||||
|
|
|
@ -46,7 +46,7 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
),
|
||||
),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(16),
|
||||
color: Theme.of(context).accentColor,
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
|
@ -58,8 +58,8 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
spacing: 16,
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
children: [
|
||||
const AvesLogo(size: 64),
|
||||
const Text(
|
||||
AvesLogo(size: 64),
|
||||
Text(
|
||||
'Aves',
|
||||
style: TextStyle(
|
||||
fontSize: 44,
|
||||
|
@ -77,19 +77,19 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
|
||||
final allMediaEntry = _FilteredCollectionNavTile(
|
||||
source: source,
|
||||
leading: const Icon(AIcons.allMedia),
|
||||
leading: Icon(AIcons.allMedia),
|
||||
title: 'All media',
|
||||
filter: null,
|
||||
);
|
||||
final videoEntry = _FilteredCollectionNavTile(
|
||||
source: source,
|
||||
leading: const Icon(AIcons.video),
|
||||
leading: Icon(AIcons.video),
|
||||
title: 'Videos',
|
||||
filter: MimeFilter(MimeTypes.anyVideo),
|
||||
);
|
||||
final favouriteEntry = _FilteredCollectionNavTile(
|
||||
source: source,
|
||||
leading: const Icon(AIcons.favourite),
|
||||
leading: Icon(AIcons.favourite),
|
||||
title: 'Favourites',
|
||||
filter: FavouriteFilter(),
|
||||
);
|
||||
|
@ -97,8 +97,8 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
top: false,
|
||||
bottom: false,
|
||||
child: ListTile(
|
||||
leading: const Icon(AIcons.info),
|
||||
title: const Text('About'),
|
||||
leading: Icon(AIcons.info),
|
||||
title: Text('About'),
|
||||
onTap: () => _goToAbout(context),
|
||||
),
|
||||
);
|
||||
|
@ -109,20 +109,20 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
videoEntry,
|
||||
favouriteEntry,
|
||||
_buildSpecialAlbumSection(),
|
||||
const Divider(),
|
||||
Divider(),
|
||||
_buildRegularAlbumSection(),
|
||||
_buildCountrySection(),
|
||||
_buildTagSection(),
|
||||
const Divider(),
|
||||
Divider(),
|
||||
aboutEntry,
|
||||
if (kDebugMode) ...[
|
||||
const Divider(),
|
||||
Divider(),
|
||||
SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
child: ListTile(
|
||||
leading: const Icon(AIcons.debug),
|
||||
title: const Text('Debug'),
|
||||
leading: Icon(AIcons.debug),
|
||||
title: Text('Debug'),
|
||||
onTap: () => _goToDebug(context),
|
||||
),
|
||||
),
|
||||
|
@ -157,7 +157,7 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
leading: IconUtils.getAlbumIcon(context: context, album: album),
|
||||
title: uniqueName,
|
||||
trailing: androidFileUtils.isOnRemovableStorage(album)
|
||||
? const Icon(
|
||||
? Icon(
|
||||
AIcons.removableStorage,
|
||||
size: 16,
|
||||
color: Colors.grey,
|
||||
|
@ -177,10 +177,10 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
return type != AlbumType.regular && type != AlbumType.app;
|
||||
});
|
||||
|
||||
if (specialAlbums.isEmpty) return const SizedBox.shrink();
|
||||
if (specialAlbums.isEmpty) return SizedBox.shrink();
|
||||
return Column(
|
||||
children: [
|
||||
const Divider(),
|
||||
Divider(),
|
||||
...specialAlbums.map((album) => _buildAlbumEntry(album, dense: false)),
|
||||
],
|
||||
);
|
||||
|
@ -192,8 +192,8 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
top: false,
|
||||
bottom: false,
|
||||
child: ListTile(
|
||||
leading: const Icon(AIcons.album),
|
||||
title: const Text('Albums'),
|
||||
leading: Icon(AIcons.album),
|
||||
title: Text('Albums'),
|
||||
trailing: StreamBuilder(
|
||||
stream: source.eventBus.on<AlbumsChangedEvent>(),
|
||||
builder: (context, snapshot) {
|
||||
|
@ -214,8 +214,8 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
top: false,
|
||||
bottom: false,
|
||||
child: ListTile(
|
||||
leading: const Icon(AIcons.location),
|
||||
title: const Text('Countries'),
|
||||
leading: Icon(AIcons.location),
|
||||
title: Text('Countries'),
|
||||
trailing: StreamBuilder(
|
||||
stream: source.eventBus.on<LocationsChangedEvent>(),
|
||||
builder: (context, snapshot) {
|
||||
|
@ -236,8 +236,8 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
top: false,
|
||||
bottom: false,
|
||||
child: ListTile(
|
||||
leading: const Icon(AIcons.tag),
|
||||
title: const Text('Tags'),
|
||||
leading: Icon(AIcons.tag),
|
||||
title: Text('Tags'),
|
||||
trailing: StreamBuilder(
|
||||
stream: source.eventBus.on<TagsChangedEvent>(),
|
||||
builder: (context, snapshot) {
|
||||
|
@ -263,7 +263,7 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
title: 'Albums',
|
||||
filterEntries: source.getAlbumEntries(),
|
||||
filterBuilder: (s) => AlbumFilter(s, source.getUniqueAlbumName(s)),
|
||||
emptyBuilder: () => const EmptyContent(
|
||||
emptyBuilder: () => EmptyContent(
|
||||
icon: AIcons.album,
|
||||
text: 'No albums',
|
||||
),
|
||||
|
@ -282,7 +282,7 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
title: 'Countries',
|
||||
filterEntries: source.getCountryEntries(),
|
||||
filterBuilder: (s) => LocationFilter(LocationLevel.country, s),
|
||||
emptyBuilder: () => const EmptyContent(
|
||||
emptyBuilder: () => EmptyContent(
|
||||
icon: AIcons.location,
|
||||
text: 'No countries',
|
||||
),
|
||||
|
@ -301,7 +301,7 @@ class _AppDrawerState extends State<AppDrawer> {
|
|||
title: 'Tags',
|
||||
filterEntries: source.getTagEntries(),
|
||||
filterBuilder: (s) => TagFilter(s),
|
||||
emptyBuilder: () => const EmptyContent(
|
||||
emptyBuilder: () => EmptyContent(
|
||||
icon: AIcons.tag,
|
||||
text: 'No tags',
|
||||
),
|
||||
|
|
|
@ -34,7 +34,7 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: const Text('New Album'),
|
||||
title: Text('New Album'),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
@ -42,8 +42,8 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
|
|||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Text('Storage:'),
|
||||
const SizedBox(width: 8),
|
||||
Text('Storage:'),
|
||||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: DropdownButton<StorageVolume>(
|
||||
isExpanded: true,
|
||||
|
@ -68,7 +68,7 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
|
|||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(height: 16),
|
||||
],
|
||||
ValueListenableBuilder<bool>(
|
||||
valueListenable: _existsNotifier,
|
||||
|
@ -84,7 +84,7 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
|
|||
}),
|
||||
],
|
||||
),
|
||||
contentPadding: const EdgeInsets.fromLTRB(24, 20, 24, 0),
|
||||
contentPadding: EdgeInsets.fromLTRB(24, 20, 24, 0),
|
||||
actions: [
|
||||
FlatButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
|
|
|
@ -120,7 +120,7 @@ class EntryActionDelegate with FeedbackMixin, PermissionAwareMixin {
|
|||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
content: const Text('Are you sure?'),
|
||||
content: Text('Are you sure?'),
|
||||
actions: [
|
||||
FlatButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
|
|
|
@ -11,7 +11,7 @@ mixin FeedbackMixin {
|
|||
void showFeedback(BuildContext context, String message) {
|
||||
_flushbar = Flushbar(
|
||||
message: message,
|
||||
margin: const EdgeInsets.all(8),
|
||||
margin: EdgeInsets.all(8),
|
||||
borderRadius: 8,
|
||||
borderColor: Colors.white30,
|
||||
borderWidth: 0.5,
|
||||
|
|
|
@ -23,7 +23,7 @@ mixin PermissionAwareMixin {
|
|||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: const Text('Storage Volume Access'),
|
||||
title: Text('Storage Volume Access'),
|
||||
content: Text('Please select the $dirDisplayName directory of “$volumeDescription” in the next screen, so that this app can access it and complete your request.'),
|
||||
actions: [
|
||||
FlatButton(
|
||||
|
|
|
@ -69,7 +69,7 @@ class SelectionActionDelegate with FeedbackMixin, PermissionAwareMixin {
|
|||
return FilterGridPage(
|
||||
source: source,
|
||||
appBar: SliverAppBar(
|
||||
leading: const BackButton(),
|
||||
leading: BackButton(),
|
||||
title: Text(copy ? 'Copy to Album' : 'Move to Album'),
|
||||
actions: [
|
||||
IconButton(
|
||||
|
@ -90,7 +90,7 @@ class SelectionActionDelegate with FeedbackMixin, PermissionAwareMixin {
|
|||
),
|
||||
filterEntries: source.getAlbumEntries(),
|
||||
filterBuilder: (s) => AlbumFilter(s, source.getUniqueAlbumName(s)),
|
||||
emptyBuilder: () => const EmptyContent(
|
||||
emptyBuilder: () => EmptyContent(
|
||||
icon: AIcons.album,
|
||||
text: 'No albums',
|
||||
),
|
||||
|
@ -258,7 +258,7 @@ class SelectionActionDelegate with FeedbackMixin, PermissionAwareMixin {
|
|||
child: StreamBuilder<T>(
|
||||
stream: opStream,
|
||||
builder: (context, snapshot) {
|
||||
Widget child = const SizedBox.shrink();
|
||||
Widget child = SizedBox.shrink();
|
||||
if (!snapshot.hasError && snapshot.connectionState == ConnectionState.active) {
|
||||
final percent = processed.length.toDouble() / selection.length;
|
||||
child = CircularPercentIndicator(
|
||||
|
|
|
@ -32,7 +32,7 @@ class SourceStateAwareAppBarTitle extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
child: sourceState == SourceState.ready
|
||||
? const SizedBox.shrink()
|
||||
? SizedBox.shrink()
|
||||
: SourceStateSubtitle(
|
||||
source: source,
|
||||
),
|
||||
|
@ -68,7 +68,7 @@ class SourceStateSubtitle extends StatelessWidget {
|
|||
}
|
||||
final subtitleStyle = Theme.of(context).textTheme.caption;
|
||||
return subtitle == null
|
||||
? const SizedBox.shrink()
|
||||
? SizedBox.shrink()
|
||||
: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
@ -76,10 +76,10 @@ class SourceStateSubtitle extends StatelessWidget {
|
|||
StreamBuilder<ProgressEvent>(
|
||||
stream: source.progressStream,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError || !snapshot.hasData) return const SizedBox.shrink();
|
||||
if (snapshot.hasError || !snapshot.hasData) return SizedBox.shrink();
|
||||
final progress = snapshot.data;
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: 8),
|
||||
padding: EdgeInsetsDirectional.only(start: 8),
|
||||
child: Text(
|
||||
'${progress.done}/${progress.total}',
|
||||
style: subtitleStyle.copyWith(color: Colors.white30),
|
||||
|
|
|
@ -66,7 +66,7 @@ class _AvesFilterChipState extends State<AvesFilterChip> {
|
|||
Widget build(BuildContext context) {
|
||||
final hasBackground = widget.background != null;
|
||||
final leading = filter.iconBuilder(context, AvesFilterChip.iconSize, showGenericIcon: widget.showGenericIcon);
|
||||
final trailing = widget.removable ? const Icon(AIcons.clear, size: AvesFilterChip.iconSize) : null;
|
||||
final trailing = widget.removable ? Icon(AIcons.clear, size: AvesFilterChip.iconSize) : null;
|
||||
|
||||
Widget content = Row(
|
||||
mainAxisSize: hasBackground ? MainAxisSize.max : MainAxisSize.min,
|
||||
|
@ -74,7 +74,7 @@ class _AvesFilterChipState extends State<AvesFilterChip> {
|
|||
children: [
|
||||
if (leading != null) ...[
|
||||
leading,
|
||||
const SizedBox(width: AvesFilterChip.padding),
|
||||
SizedBox(width: AvesFilterChip.padding),
|
||||
],
|
||||
Flexible(
|
||||
child: Text(
|
||||
|
@ -85,7 +85,7 @@ class _AvesFilterChipState extends State<AvesFilterChip> {
|
|||
),
|
||||
),
|
||||
if (trailing != null) ...[
|
||||
const SizedBox(width: AvesFilterChip.padding),
|
||||
SizedBox(width: AvesFilterChip.padding),
|
||||
trailing,
|
||||
],
|
||||
],
|
||||
|
@ -102,7 +102,7 @@ class _AvesFilterChipState extends State<AvesFilterChip> {
|
|||
}
|
||||
|
||||
content = Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: AvesFilterChip.padding * 2, vertical: 2),
|
||||
padding: EdgeInsets.symmetric(horizontal: AvesFilterChip.padding * 2, vertical: 2),
|
||||
child: content,
|
||||
);
|
||||
|
||||
|
@ -112,7 +112,7 @@ class _AvesFilterChipState extends State<AvesFilterChip> {
|
|||
color: Colors.black54,
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.bodyText2.copyWith(
|
||||
shadows: const [
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Colors.black87,
|
||||
offset: Offset(0.5, 1.0),
|
||||
|
@ -128,7 +128,7 @@ class _AvesFilterChipState extends State<AvesFilterChip> {
|
|||
final borderRadius = AvesFilterChip.borderRadius;
|
||||
|
||||
Widget chip = Container(
|
||||
constraints: const BoxConstraints(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: AvesFilterChip.minChipWidth,
|
||||
maxWidth: AvesFilterChip.maxChipWidth,
|
||||
minHeight: AvesFilterChip.minChipHeight,
|
||||
|
@ -171,7 +171,7 @@ class _AvesFilterChipState extends State<AvesFilterChip> {
|
|||
),
|
||||
position: DecorationPosition.foreground,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
padding: EdgeInsets.symmetric(vertical: 8),
|
||||
child: content,
|
||||
),
|
||||
);
|
||||
|
|
|
@ -55,7 +55,7 @@ class MediaStoreSource extends CollectionSource {
|
|||
allNewEntries.addAll(pendingNewEntries);
|
||||
addAll(pendingNewEntries);
|
||||
pendingNewEntries.clear();
|
||||
};
|
||||
}
|
||||
ImageFileService.getImageEntries(knownEntryMap).listen(
|
||||
(entry) {
|
||||
pendingNewEntries.add(entry);
|
||||
|
|
|
@ -131,10 +131,10 @@ class OverlayIcon extends StatelessWidget {
|
|||
);
|
||||
|
||||
return Container(
|
||||
margin: const EdgeInsets.all(1),
|
||||
margin: EdgeInsets.all(1),
|
||||
padding: text != null ? EdgeInsets.only(right: size / 4) : null,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xBB000000),
|
||||
color: Color(0xBB000000),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(size),
|
||||
),
|
||||
|
@ -146,7 +146,7 @@ class OverlayIcon extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
iconChild,
|
||||
const SizedBox(width: 2),
|
||||
SizedBox(width: 2),
|
||||
Text(text),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -23,7 +23,7 @@ class LinkChip extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle.merge(
|
||||
style: (textStyle ?? const TextStyle()).copyWith(color: color),
|
||||
style: (textStyle ?? TextStyle()).copyWith(color: color),
|
||||
child: InkWell(
|
||||
borderRadius: borderRadius,
|
||||
onTap: () async {
|
||||
|
@ -32,16 +32,16 @@ class LinkChip extends StatelessWidget {
|
|||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (leading != null) ...[
|
||||
leading,
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
],
|
||||
Text(text),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
Builder(
|
||||
builder: (context) => Icon(
|
||||
AIcons.openInNew,
|
||||
|
|
|
@ -20,13 +20,13 @@ class MenuRow extends StatelessWidget {
|
|||
if (checked != null) ...[
|
||||
Opacity(
|
||||
opacity: checked ? 1 : 0,
|
||||
child: const Icon(AIcons.checked),
|
||||
child: Icon(AIcons.checked),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
],
|
||||
if (icon != null) ...[
|
||||
Icon(icon),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
],
|
||||
Expanded(child: Text(text)),
|
||||
],
|
||||
|
|
|
@ -10,21 +10,21 @@ ScrollThumbBuilder avesScrollThumbBuilder({
|
|||
@required Color backgroundColor,
|
||||
}) {
|
||||
final scrollThumb = Container(
|
||||
decoration: const BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black26,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(12.0),
|
||||
),
|
||||
),
|
||||
height: height,
|
||||
margin: const EdgeInsets.only(right: .5),
|
||||
padding: const EdgeInsets.all(2),
|
||||
margin: EdgeInsets.only(right: .5),
|
||||
padding: EdgeInsets.all(2),
|
||||
child: ClipPath(
|
||||
child: Container(
|
||||
width: 20.0,
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor,
|
||||
borderRadius: const BorderRadius.all(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(12.0),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -51,8 +51,8 @@ class DebugPageState extends State<DebugPage> {
|
|||
length: 4,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Debug'),
|
||||
bottom: const TabBar(
|
||||
title: Text('Debug'),
|
||||
bottom: TabBar(
|
||||
tabs: [
|
||||
Tab(icon: Icon(OMIcons.whatshot)),
|
||||
Tab(icon: Icon(OMIcons.settings)),
|
||||
|
@ -81,9 +81,9 @@ class DebugPageState extends State<DebugPage> {
|
|||
final withGps = catalogued.where((entry) => entry.hasGps);
|
||||
final located = withGps.where((entry) => entry.isLocated);
|
||||
return ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(16),
|
||||
children: [
|
||||
const Text('Time dilation'),
|
||||
Text('Time dilation'),
|
||||
Slider(
|
||||
value: timeDilation,
|
||||
onChanged: (v) => setState(() => timeDilation = v),
|
||||
|
@ -92,24 +92,24 @@ class DebugPageState extends State<DebugPage> {
|
|||
divisions: 9,
|
||||
label: '$timeDilation',
|
||||
),
|
||||
const Divider(),
|
||||
Divider(),
|
||||
Text('Entries: ${entries.length}'),
|
||||
Text('Catalogued: ${catalogued.length}'),
|
||||
Text('With GPS: ${withGps.length}'),
|
||||
Text('With address: ${located.length}'),
|
||||
const Divider(),
|
||||
Divider(),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text('Image cache:\n\t${imageCache.currentSize}/${imageCache.maximumSize} items\n\t${formatFilesize(imageCache.currentSizeBytes)}/${formatFilesize(imageCache.maximumSizeBytes)}'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
RaisedButton(
|
||||
onPressed: () {
|
||||
imageCache.clear();
|
||||
setState(() {});
|
||||
},
|
||||
child: const Text('Clear'),
|
||||
child: Text('Clear'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -118,43 +118,43 @@ class DebugPageState extends State<DebugPage> {
|
|||
Expanded(
|
||||
child: Text('SVG cache: ${PictureProvider.cacheCount} items'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
RaisedButton(
|
||||
onPressed: () {
|
||||
PictureProvider.clearCache();
|
||||
setState(() {});
|
||||
},
|
||||
child: const Text('Clear'),
|
||||
child: Text('Clear'),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
const Expanded(
|
||||
Expanded(
|
||||
child: Text('Glide disk cache: ?'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const RaisedButton(
|
||||
SizedBox(width: 8),
|
||||
RaisedButton(
|
||||
onPressed: ImageFileService.clearSizedThumbnailDiskCache,
|
||||
child: Text('Clear'),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Divider(),
|
||||
Divider(),
|
||||
FutureBuilder<int>(
|
||||
future: _dbFileSizeLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text('DB file size: ${formatFilesize(snapshot.data)}'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
RaisedButton(
|
||||
onPressed: () => metadataDb.reset().then((_) => _startDbReport()),
|
||||
child: const Text('Reset'),
|
||||
child: Text('Reset'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -164,16 +164,16 @@ class DebugPageState extends State<DebugPage> {
|
|||
future: _dbEntryLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text('DB entry rows: ${snapshot.data.length}'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
RaisedButton(
|
||||
onPressed: () => metadataDb.clearEntries().then((_) => _startDbReport()),
|
||||
child: const Text('Clear'),
|
||||
child: Text('Clear'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -183,16 +183,16 @@ class DebugPageState extends State<DebugPage> {
|
|||
future: _dbDateLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text('DB date rows: ${snapshot.data.length}'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
RaisedButton(
|
||||
onPressed: () => metadataDb.clearDates().then((_) => _startDbReport()),
|
||||
child: const Text('Clear'),
|
||||
child: Text('Clear'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -202,16 +202,16 @@ class DebugPageState extends State<DebugPage> {
|
|||
future: _dbMetadataLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text('DB metadata rows: ${snapshot.data.length}'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
RaisedButton(
|
||||
onPressed: () => metadataDb.clearMetadataEntries().then((_) => _startDbReport()),
|
||||
child: const Text('Clear'),
|
||||
child: Text('Clear'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -221,16 +221,16 @@ class DebugPageState extends State<DebugPage> {
|
|||
future: _dbAddressLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text('DB address rows: ${snapshot.data.length}'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
RaisedButton(
|
||||
onPressed: () => metadataDb.clearAddresses().then((_) => _startDbReport()),
|
||||
child: const Text('Clear'),
|
||||
child: Text('Clear'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -240,16 +240,16 @@ class DebugPageState extends State<DebugPage> {
|
|||
future: _dbFavouritesLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text('DB favourite rows: ${snapshot.data.length} (${favourites.count} in memory)'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
RaisedButton(
|
||||
onPressed: () => favourites.clear().then((_) => _startDbReport()),
|
||||
child: const Text('Clear'),
|
||||
child: Text('Clear'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -261,17 +261,17 @@ class DebugPageState extends State<DebugPage> {
|
|||
|
||||
Widget _buildSettingsTabView() {
|
||||
return ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(16),
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const Expanded(
|
||||
Expanded(
|
||||
child: Text('Settings'),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
RaisedButton(
|
||||
onPressed: () => settings.reset().then((_) => setState(() {})),
|
||||
child: const Text('Reset'),
|
||||
child: Text('Reset'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -287,7 +287,7 @@ class DebugPageState extends State<DebugPage> {
|
|||
|
||||
Widget _buildStorageTabView() {
|
||||
return ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(16),
|
||||
children: [
|
||||
...androidFileUtils.storageVolumes.expand((v) => [
|
||||
Text(v.path),
|
||||
|
@ -298,7 +298,7 @@ class DebugPageState extends State<DebugPage> {
|
|||
'isRemovable': '${v.isRemovable}',
|
||||
'state': '${v.state}',
|
||||
}),
|
||||
const Divider(),
|
||||
Divider(),
|
||||
])
|
||||
],
|
||||
);
|
||||
|
@ -306,13 +306,13 @@ class DebugPageState extends State<DebugPage> {
|
|||
|
||||
Widget _buildEnvTabView() {
|
||||
return ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(16),
|
||||
children: [
|
||||
FutureBuilder<Map>(
|
||||
future: _envLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
final data = SplayTreeMap.of(snapshot.data.map((k, v) => MapEntry(k.toString(), v?.toString() ?? 'null')));
|
||||
return InfoRowGroup(data);
|
||||
},
|
||||
|
|
|
@ -106,7 +106,7 @@ class FilterGridPage extends StatelessWidget {
|
|||
hasScrollBody: false,
|
||||
)
|
||||
: SliverPadding(
|
||||
padding: const EdgeInsets.all(AvesFilterChip.outlineWidth),
|
||||
padding: EdgeInsets.all(AvesFilterChip.outlineWidth),
|
||||
sliver: SliverGrid(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, i) {
|
||||
|
@ -132,7 +132,7 @@ class FilterGridPage extends StatelessWidget {
|
|||
},
|
||||
childCount: filterKeys.length,
|
||||
),
|
||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
maxCrossAxisExtent: maxCrossAxisExtent,
|
||||
mainAxisSpacing: 8,
|
||||
crossAxisSpacing: 8,
|
||||
|
@ -201,18 +201,18 @@ class DecoratedFilterChip extends StatelessWidget {
|
|||
Widget _buildDetails(CollectionFilter filter) {
|
||||
final count = Text(
|
||||
'${source.count(filter)}',
|
||||
style: const TextStyle(color: FilterGridPage.detailColor),
|
||||
style: TextStyle(color: FilterGridPage.detailColor),
|
||||
);
|
||||
return filter is AlbumFilter && androidFileUtils.isOnRemovableStorage(filter.album)
|
||||
? Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(
|
||||
Icon(
|
||||
AIcons.removableStorage,
|
||||
size: 16,
|
||||
color: FilterGridPage.detailColor,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
count,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -37,8 +37,8 @@ class _FullscreenDebugPageState extends State<FullscreenDebugPage> {
|
|||
length: 2,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Debug'),
|
||||
bottom: const TabBar(
|
||||
title: Text('Debug'),
|
||||
bottom: TabBar(
|
||||
tabs: [
|
||||
Tab(text: 'DB'),
|
||||
Tab(text: 'Content Resolver'),
|
||||
|
@ -60,13 +60,13 @@ class _FullscreenDebugPageState extends State<FullscreenDebugPage> {
|
|||
Widget _buildDbTabView() {
|
||||
final catalog = widget.entry.catalogMetadata;
|
||||
return ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(16),
|
||||
children: [
|
||||
FutureBuilder<DateMetadata>(
|
||||
future: _dbDateLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
final data = snapshot.data;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -80,12 +80,12 @@ class _FullscreenDebugPageState extends State<FullscreenDebugPage> {
|
|||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(height: 16),
|
||||
FutureBuilder<CatalogMetadata>(
|
||||
future: _dbMetadataLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
final data = snapshot.data;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -106,12 +106,12 @@ class _FullscreenDebugPageState extends State<FullscreenDebugPage> {
|
|||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(height: 16),
|
||||
FutureBuilder<AddressDetails>(
|
||||
future: _dbAddressLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
final data = snapshot.data;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -129,7 +129,7 @@ class _FullscreenDebugPageState extends State<FullscreenDebugPage> {
|
|||
);
|
||||
},
|
||||
),
|
||||
const Divider(),
|
||||
Divider(),
|
||||
Text('Catalog metadata:${catalog == null ? ' no data' : ''}'),
|
||||
if (catalog != null)
|
||||
InfoRowGroup({
|
||||
|
@ -153,13 +153,13 @@ class _FullscreenDebugPageState extends State<FullscreenDebugPage> {
|
|||
|
||||
Widget _buildContentResolverTabView() {
|
||||
return ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(16),
|
||||
children: [
|
||||
FutureBuilder<Map>(
|
||||
future: _contentResolverMetadataLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return Text(snapshot.error.toString());
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
final data = SplayTreeMap.of(snapshot.data.map((k, v) {
|
||||
final key = k.toString();
|
||||
var value = v?.toString() ?? 'null';
|
||||
|
|
|
@ -87,7 +87,7 @@ class FullscreenBodyState extends State<FullscreenBody> with SingleTickerProvide
|
|||
// no bounce at the bottom, to avoid video controller displacement
|
||||
curve: Curves.easeOutQuad,
|
||||
);
|
||||
_bottomOverlayOffset = Tween(begin: const Offset(0, 1), end: const Offset(0, 0)).animate(CurvedAnimation(
|
||||
_bottomOverlayOffset = Tween(begin: Offset(0, 1), end: Offset(0, 0)).animate(CurvedAnimation(
|
||||
parent: _overlayAnimationController,
|
||||
curve: Curves.easeOutQuad,
|
||||
));
|
||||
|
@ -178,7 +178,7 @@ class FullscreenBodyState extends State<FullscreenBody> with SingleTickerProvide
|
|||
final child = ValueListenableBuilder<ImageEntry>(
|
||||
valueListenable: _entryNotifier,
|
||||
builder: (context, entry, child) {
|
||||
if (entry == null) return const SizedBox.shrink();
|
||||
if (entry == null) return SizedBox.shrink();
|
||||
return FullscreenTopOverlay(
|
||||
entry: entry,
|
||||
scale: _topOverlayScale,
|
||||
|
@ -459,7 +459,7 @@ class _FullscreenVerticalPageViewState extends State<FullscreenVerticalPageView>
|
|||
Widget build(BuildContext context) {
|
||||
final pages = [
|
||||
// fake page for opacity transition between collection and fullscreen views
|
||||
const SizedBox(),
|
||||
SizedBox(),
|
||||
hasCollection
|
||||
? MultiImagePage(
|
||||
collection: collection,
|
||||
|
@ -494,7 +494,7 @@ class _FullscreenVerticalPageViewState extends State<FullscreenVerticalPageView>
|
|||
child: PageView(
|
||||
scrollDirection: Axis.vertical,
|
||||
controller: widget.verticalPager,
|
||||
physics: const PhotoViewPageViewScrollPhysics(parent: PageScrollPhysics()),
|
||||
physics: PhotoViewPageViewScrollPhysics(parent: PageScrollPhysics()),
|
||||
onPageChanged: (page) {
|
||||
widget.onVerticalPageChanged(page);
|
||||
_infoPageVisibleNotifier.value = page == pages.length - 1;
|
||||
|
|
|
@ -39,7 +39,7 @@ class MultiImagePageState extends State<MultiImagePage> with AutomaticKeepAliveC
|
|||
child: PageView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
controller: widget.pageController,
|
||||
physics: const PhotoViewPageViewScrollPhysics(parent: BouncingScrollPhysics()),
|
||||
physics: PhotoViewPageViewScrollPhysics(parent: BouncingScrollPhysics()),
|
||||
onPageChanged: widget.onPageChanged,
|
||||
itemBuilder: (context, index) {
|
||||
final entry = entries[index];
|
||||
|
|
|
@ -41,7 +41,7 @@ class ImageView extends StatelessWidget {
|
|||
entry: entry,
|
||||
controller: videoController,
|
||||
)
|
||||
: const SizedBox(),
|
||||
: SizedBox(),
|
||||
backgroundDecoration: backgroundDecoration,
|
||||
scaleStateChangedCallback: onScaleChanged,
|
||||
minScale: PhotoViewComputedScale.contained,
|
||||
|
@ -72,7 +72,7 @@ class ImageView extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Widget child;
|
||||
if (entry.isSvg) {
|
||||
|
@ -107,7 +107,7 @@ class ImageView extends StatelessWidget {
|
|||
context,
|
||||
imageCache.statusForKey(uriImage).keepAlive ? uriImage : fastThumbnailProvider,
|
||||
),
|
||||
loadFailedChild: const EmptyContent(
|
||||
loadFailedChild: EmptyContent(
|
||||
icon: AIcons.error,
|
||||
text: 'Oops!',
|
||||
alignment: Alignment.center,
|
||||
|
|
|
@ -65,9 +65,9 @@ class BasicSection extends StatelessWidget {
|
|||
...filters,
|
||||
if (entry.isFavourite) FavouriteFilter(),
|
||||
]..sort();
|
||||
if (effectiveFilters.isEmpty) return const SizedBox.shrink();
|
||||
if (effectiveFilters.isEmpty) return SizedBox.shrink();
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: AvesFilterChip.outlineWidth / 2) + const EdgeInsets.only(top: 8),
|
||||
padding: EdgeInsets.symmetric(horizontal: AvesFilterChip.outlineWidth / 2) + EdgeInsets.only(top: 8),
|
||||
child: Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
|
|
|
@ -40,11 +40,11 @@ class InfoPageState extends State<InfoPage> {
|
|||
|
||||
final appBar = SliverAppBar(
|
||||
leading: IconButton(
|
||||
icon: const Icon(AIcons.goUp),
|
||||
icon: Icon(AIcons.goUp),
|
||||
onPressed: _goToImage,
|
||||
tooltip: 'Back to image',
|
||||
),
|
||||
title: const Text('Info'),
|
||||
title: Text('Info'),
|
||||
floating: true,
|
||||
);
|
||||
|
||||
|
@ -77,7 +77,7 @@ class InfoPageState extends State<InfoPage> {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: BasicSection(entry: entry, collection: collection, onFilter: _goToCollection)),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
Expanded(child: locationSection),
|
||||
],
|
||||
),
|
||||
|
@ -100,7 +100,7 @@ class InfoPageState extends State<InfoPage> {
|
|||
slivers: [
|
||||
appBar,
|
||||
SliverPadding(
|
||||
padding: horizontalPadding + const EdgeInsets.only(top: 8),
|
||||
padding: horizontalPadding + EdgeInsets.only(top: 8),
|
||||
sliver: basicAndLocationSliver,
|
||||
),
|
||||
SliverPadding(
|
||||
|
@ -165,7 +165,7 @@ class SectionRow extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const dim = 32.0;
|
||||
Widget buildDivider() => const SizedBox(
|
||||
Widget buildDivider() => SizedBox(
|
||||
width: dim,
|
||||
child: Divider(
|
||||
thickness: AvesFilterChip.outlineWidth,
|
||||
|
@ -177,7 +177,7 @@ class SectionRow extends StatelessWidget {
|
|||
children: [
|
||||
buildDivider(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Icon(
|
||||
icon,
|
||||
size: dim,
|
||||
|
@ -196,7 +196,7 @@ class InfoRowGroup extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (keyValues.isEmpty) return const SizedBox.shrink();
|
||||
if (keyValues.isEmpty) return SizedBox.shrink();
|
||||
final lastKey = keyValues.keys.last;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -206,13 +206,13 @@ class InfoRowGroup extends StatelessWidget {
|
|||
children: keyValues.entries
|
||||
.expand(
|
||||
(kv) => [
|
||||
TextSpan(text: '${kv.key} ', style: const TextStyle(color: Colors.white70, height: 1.7)),
|
||||
TextSpan(text: '${kv.key} ', style: TextStyle(color: Colors.white70, height: 1.7)),
|
||||
TextSpan(text: '${kv.value}${kv.key == lastKey ? '' : '\n'}'),
|
||||
],
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
style: const TextStyle(fontFamily: 'Concourse'),
|
||||
style: TextStyle(fontFamily: 'Concourse'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
@ -90,7 +90,7 @@ class _LocationSectionState extends State<LocationSection> {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (widget.showTitle)
|
||||
const Padding(
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 8),
|
||||
child: SectionRow(AIcons.location),
|
||||
),
|
||||
|
@ -105,12 +105,12 @@ class _LocationSectionState extends State<LocationSection> {
|
|||
),
|
||||
if (location.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
padding: EdgeInsets.only(top: 8),
|
||||
child: InfoRowGroup({'Address': location}),
|
||||
),
|
||||
if (filters.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: AvesFilterChip.outlineWidth / 2) + const EdgeInsets.only(top: 8),
|
||||
padding: EdgeInsets.symmetric(horizontal: AvesFilterChip.outlineWidth / 2) + EdgeInsets.only(top: 8),
|
||||
child: Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
|
@ -126,7 +126,7 @@ class _LocationSectionState extends State<LocationSection> {
|
|||
);
|
||||
} else {
|
||||
_loadedUri = null;
|
||||
return const SizedBox.shrink();
|
||||
return SizedBox.shrink();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,7 +175,7 @@ class ImageMapState extends State<ImageMap> with AutomaticKeepAliveClientMixin {
|
|||
// and triggering by mistake a move to the image page above
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: const BorderRadius.all(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(16),
|
||||
),
|
||||
child: Container(
|
||||
|
@ -208,24 +208,24 @@ class ImageMapState extends State<ImageMap> with AutomaticKeepAliveClientMixin {
|
|||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
TooltipTheme(
|
||||
data: TooltipTheme.of(context).copyWith(
|
||||
preferBelow: false,
|
||||
),
|
||||
child: Column(children: [
|
||||
IconButton(
|
||||
icon: const Icon(AIcons.zoomIn),
|
||||
icon: Icon(AIcons.zoomIn),
|
||||
onPressed: _controller == null ? null : () => _zoomBy(1),
|
||||
tooltip: 'Zoom in',
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(AIcons.zoomOut),
|
||||
icon: Icon(AIcons.zoomOut),
|
||||
onPressed: _controller == null ? null : () => _zoomBy(-1),
|
||||
tooltip: 'Zoom out',
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(AIcons.openInNew),
|
||||
icon: Icon(AIcons.openInNew),
|
||||
onPressed: () => AndroidAppService.openMap(widget.geoUri),
|
||||
tooltip: 'Show on map...',
|
||||
),
|
||||
|
|
|
@ -65,7 +65,7 @@ class _MetadataSectionSliverState extends State<MetadataSectionSliver> with Auto
|
|||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
|
||||
if (_metadata.isEmpty) return const SliverToBoxAdapter(child: SizedBox.shrink());
|
||||
if (_metadata.isEmpty) return SliverToBoxAdapter(child: SizedBox.shrink());
|
||||
|
||||
final directoriesWithoutTitle = _metadata.where((dir) => dir.name.isEmpty).toList();
|
||||
final directoriesWithTitle = _metadata.where((dir) => dir.name.isNotEmpty).toList();
|
||||
|
@ -74,7 +74,7 @@ class _MetadataSectionSliverState extends State<MetadataSectionSliver> with Auto
|
|||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
if (index == 0) {
|
||||
return const SectionRow(AIcons.info);
|
||||
return SectionRow(AIcons.info);
|
||||
}
|
||||
if (index < untitledDirectoryCount + 1) {
|
||||
final dir = directoriesWithoutTitle[index - 1];
|
||||
|
@ -91,10 +91,10 @@ class _MetadataSectionSliverState extends State<MetadataSectionSliver> with Auto
|
|||
expandedNotifier: _expandedDirectoryNotifier,
|
||||
title: _DirectoryTitle(dir.name),
|
||||
children: [
|
||||
const Divider(thickness: 1.0, height: 1.0),
|
||||
Divider(thickness: 1.0, height: 1.0),
|
||||
Container(
|
||||
alignment: Alignment.topLeft,
|
||||
padding: const EdgeInsets.all(8),
|
||||
padding: EdgeInsets.all(8),
|
||||
child: InfoRowGroup(dir.tags),
|
||||
),
|
||||
],
|
||||
|
@ -150,10 +150,10 @@ class _DirectoryTitle extends StatelessWidget {
|
|||
decoration: HighlightDecoration(
|
||||
color: stringToColor(name),
|
||||
),
|
||||
margin: const EdgeInsets.symmetric(vertical: 4.0),
|
||||
margin: EdgeInsets.symmetric(vertical: 4.0),
|
||||
child: Text(
|
||||
name,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Colors.black,
|
||||
|
|
|
@ -90,7 +90,7 @@ class _FullscreenBottomOverlayState extends State<FullscreenBottomOverlay> {
|
|||
_lastEntry = entry;
|
||||
}
|
||||
return _lastEntry == null
|
||||
? const SizedBox.shrink()
|
||||
? SizedBox.shrink()
|
||||
: Padding(
|
||||
// keep padding inside `FutureBuilder` so that overlay takes no space until data is ready
|
||||
padding: innerPadding,
|
||||
|
@ -134,7 +134,7 @@ class _FullscreenBottomOverlayContent extends AnimatedWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.bodyText2.copyWith(
|
||||
shadows: const [
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Colors.black87,
|
||||
offset: Offset(0.5, 1.0),
|
||||
|
@ -163,12 +163,12 @@ class _FullscreenBottomOverlayContent extends AnimatedWidget {
|
|||
if (positionTitle.isNotEmpty) Text(positionTitle, strutStyle: Constants.overflowStrutStyle),
|
||||
if (entry.hasGps)
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: _interRowPadding),
|
||||
padding: EdgeInsets.only(top: _interRowPadding),
|
||||
child: _LocationRow(entry: entry),
|
||||
),
|
||||
if (twoColumns)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: _interRowPadding),
|
||||
padding: EdgeInsets.only(top: _interRowPadding),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(width: subRowWidth, child: _DateRow(entry)),
|
||||
|
@ -178,13 +178,13 @@ class _FullscreenBottomOverlayContent extends AnimatedWidget {
|
|||
)
|
||||
else ...[
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: _interRowPadding),
|
||||
padding: EdgeInsets.only(top: _interRowPadding),
|
||||
width: subRowWidth,
|
||||
child: _DateRow(entry),
|
||||
),
|
||||
if (hasShootingDetails)
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: _interRowPadding),
|
||||
padding: EdgeInsets.only(top: _interRowPadding),
|
||||
width: subRowWidth,
|
||||
child: _ShootingRow(details),
|
||||
),
|
||||
|
@ -216,8 +216,8 @@ class _LocationRow extends AnimatedWidget {
|
|||
}
|
||||
return Row(
|
||||
children: [
|
||||
const Icon(AIcons.location, size: _iconSize),
|
||||
const SizedBox(width: _iconPadding),
|
||||
Icon(AIcons.location, size: _iconSize),
|
||||
SizedBox(width: _iconPadding),
|
||||
Expanded(child: Text(location, strutStyle: Constants.overflowStrutStyle)),
|
||||
],
|
||||
);
|
||||
|
@ -236,8 +236,8 @@ class _DateRow extends StatelessWidget {
|
|||
final resolution = '${entry.width ?? '?'} × ${entry.height ?? '?'}';
|
||||
return Row(
|
||||
children: [
|
||||
const Icon(AIcons.date, size: _iconSize),
|
||||
const SizedBox(width: _iconPadding),
|
||||
Icon(AIcons.date, size: _iconSize),
|
||||
SizedBox(width: _iconPadding),
|
||||
Expanded(flex: 3, child: Text(dateText, strutStyle: Constants.overflowStrutStyle)),
|
||||
if (!entry.isSvg) Expanded(flex: 2, child: Text(resolution, strutStyle: Constants.overflowStrutStyle)),
|
||||
],
|
||||
|
@ -254,8 +254,8 @@ class _ShootingRow extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
const Icon(AIcons.shooting, size: _iconSize),
|
||||
const SizedBox(width: _iconPadding),
|
||||
Icon(AIcons.shooting, size: _iconSize),
|
||||
SizedBox(width: _iconPadding),
|
||||
Expanded(child: Text(details.aperture, strutStyle: Constants.overflowStrutStyle)),
|
||||
Expanded(child: Text(details.exposureTime, strutStyle: Constants.overflowStrutStyle)),
|
||||
Expanded(child: Text(details.focalLength, strutStyle: Constants.overflowStrutStyle)),
|
||||
|
|
|
@ -40,7 +40,7 @@ class FullscreenTopOverlay extends StatelessWidget {
|
|||
return SafeArea(
|
||||
minimum: (viewInsets ?? EdgeInsets.zero) + (viewPadding ?? EdgeInsets.zero),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(padding),
|
||||
padding: EdgeInsets.all(padding),
|
||||
child: Selector<MediaQueryData, Tuple2<double, Orientation>>(
|
||||
selector: (c, mq) => Tuple2(mq.size.width, mq.orientation),
|
||||
builder: (c, mq, child) {
|
||||
|
@ -126,19 +126,19 @@ class _TopOverlayRow extends StatelessWidget {
|
|||
children: [
|
||||
OverlayButton(
|
||||
scale: scale,
|
||||
child: ModalRoute.of(context)?.canPop ?? true ? const BackButton() : const CloseButton(),
|
||||
child: ModalRoute.of(context)?.canPop ?? true ? BackButton() : CloseButton(),
|
||||
),
|
||||
const Spacer(),
|
||||
Spacer(),
|
||||
...quickActions.map(_buildOverlayButton),
|
||||
OverlayButton(
|
||||
scale: scale,
|
||||
child: PopupMenuButton<EntryAction>(
|
||||
itemBuilder: (context) => [
|
||||
...inAppActions.map(_buildPopupMenuItem),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuDivider(),
|
||||
...externalAppActions.map(_buildPopupMenuItem),
|
||||
if (kDebugMode) ...[
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuDivider(),
|
||||
_buildPopupMenuItem(EntryAction.debug),
|
||||
]
|
||||
],
|
||||
|
@ -181,13 +181,13 @@ class _TopOverlayRow extends StatelessWidget {
|
|||
}
|
||||
return child != null
|
||||
? Padding(
|
||||
padding: const EdgeInsetsDirectional.only(end: padding),
|
||||
padding: EdgeInsetsDirectional.only(end: padding),
|
||||
child: OverlayButton(
|
||||
scale: scale,
|
||||
child: child,
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink();
|
||||
: SizedBox.shrink();
|
||||
}
|
||||
|
||||
PopupMenuEntry<EntryAction> _buildPopupMenuItem(EntryAction action) {
|
||||
|
@ -269,11 +269,11 @@ class _FavouriteTogglerState extends State<_FavouriteToggler> {
|
|||
builder: (context, isFavourite, child) {
|
||||
if (widget.isMenuItem) {
|
||||
return isFavourite
|
||||
? const MenuRow(
|
||||
? MenuRow(
|
||||
text: 'Remove from favourites',
|
||||
icon: AIcons.favouriteActive,
|
||||
)
|
||||
: const MenuRow(
|
||||
: MenuRow(
|
||||
text: 'Add to favourites',
|
||||
icon: AIcons.favourite,
|
||||
);
|
||||
|
@ -288,7 +288,7 @@ class _FavouriteTogglerState extends State<_FavouriteToggler> {
|
|||
),
|
||||
Sweeper(
|
||||
key: ValueKey(widget.entry),
|
||||
builder: (context) => const Icon(AIcons.favourite, color: Colors.redAccent),
|
||||
builder: (context) => Icon(AIcons.favourite, color: Colors.redAccent),
|
||||
toggledNotifier: isFavouriteNotifier,
|
||||
),
|
||||
],
|
||||
|
|
|
@ -105,7 +105,7 @@ class VideoControlOverlayState extends State<VideoControlOverlay> with SingleTic
|
|||
|
||||
final viewInsets = widget.viewInsets ?? mqViewInsets;
|
||||
final viewPadding = widget.viewPadding ?? mqViewPadding;
|
||||
final safePadding = (viewInsets + viewPadding).copyWith(bottom: 8) + const EdgeInsets.symmetric(horizontal: 8.0);
|
||||
final safePadding = (viewInsets + viewPadding).copyWith(bottom: 8) + EdgeInsets.symmetric(horizontal: 8.0);
|
||||
|
||||
return Padding(
|
||||
padding: safePadding,
|
||||
|
@ -127,7 +127,7 @@ class VideoControlOverlayState extends State<VideoControlOverlay> with SingleTic
|
|||
OverlayButton(
|
||||
scale: scale,
|
||||
child: IconButton(
|
||||
icon: const Icon(AIcons.openInNew),
|
||||
icon: Icon(AIcons.openInNew),
|
||||
onPressed: () => AndroidAppService.open(entry.uri, entry.mimeTypeAnySubtype),
|
||||
tooltip: 'Open',
|
||||
),
|
||||
|
@ -137,7 +137,7 @@ class VideoControlOverlayState extends State<VideoControlOverlay> with SingleTic
|
|||
Expanded(
|
||||
child: _buildProgressBar(),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(width: 8),
|
||||
OverlayButton(
|
||||
scale: scale,
|
||||
child: IconButton(
|
||||
|
@ -178,11 +178,11 @@ class VideoControlOverlayState extends State<VideoControlOverlay> with SingleTic
|
|||
if (_playingOnDragStart) controller.play();
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16) + const EdgeInsets.only(bottom: 16),
|
||||
padding: EdgeInsets.symmetric(vertical: 4, horizontal: 16) + EdgeInsets.only(bottom: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: FullscreenOverlay.backgroundColor,
|
||||
border: FullscreenOverlay.buildBorder(context),
|
||||
borderRadius: const BorderRadius.all(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(progressBarBorderRadius),
|
||||
),
|
||||
),
|
||||
|
@ -198,7 +198,7 @@ class VideoControlOverlayState extends State<VideoControlOverlay> with SingleTic
|
|||
final position = videoInfo.currentPosition?.floor() ?? 0;
|
||||
return Text(formatDuration(Duration(seconds: position)));
|
||||
}),
|
||||
const Spacer(),
|
||||
Spacer(),
|
||||
Text(entry.durationText),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -60,7 +60,7 @@ class AvesVideoState extends State<AvesVideo> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (controller == null) return const SizedBox();
|
||||
if (controller == null) return SizedBox();
|
||||
return StreamBuilder<IjkStatus>(
|
||||
stream: widget.controller.ijkStatusStream,
|
||||
builder: (context, snapshot) {
|
||||
|
@ -68,8 +68,8 @@ class AvesVideoState extends State<AvesVideo> {
|
|||
return isPlayable(status)
|
||||
? IjkPlayer(
|
||||
mediaController: controller,
|
||||
controllerWidgetBuilder: (controller) => const SizedBox.shrink(),
|
||||
statusWidgetBuilder: (context, controller, status) => const SizedBox.shrink(),
|
||||
controllerWidgetBuilder: (controller) => SizedBox.shrink(),
|
||||
statusWidgetBuilder: (context, controller, status) => SizedBox.shrink(),
|
||||
textureBuilder: (context, controller, info) {
|
||||
var id = controller.textureId;
|
||||
var child = id != null
|
||||
|
|
|
@ -95,8 +95,8 @@ class _HomePageState extends State<HomePage> {
|
|||
return FutureBuilder<void>(
|
||||
future: _appSetup,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError) return const Icon(AIcons.error);
|
||||
if (snapshot.connectionState != ConnectionState.done) return const Scaffold();
|
||||
if (snapshot.hasError) return Icon(AIcons.error);
|
||||
if (snapshot.connectionState != ConnectionState.done) return Scaffold();
|
||||
if (AvesApp.mode == AppMode.view) {
|
||||
return SingleFullscreenPage(entry: _viewerEntry);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ class _HomePageState extends State<HomePage> {
|
|||
sortFactor: settings.collectionSortFactor,
|
||||
));
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
return SizedBox.shrink();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class FilterTable extends StatelessWidget {
|
|||
final lineHeight = 16 * textScaleFactor;
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: AvesFilterChip.outlineWidth / 2 + 6, end: 8),
|
||||
padding: EdgeInsetsDirectional.only(start: AvesFilterChip.outlineWidth / 2 + 6, end: 8),
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final showPercentIndicator = constraints.maxWidth - (chipWidth + countWidth) > percentIndicatorMinWidth;
|
||||
|
@ -49,7 +49,7 @@ class FilterTable extends StatelessWidget {
|
|||
return TableRow(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.only(bottom: 8),
|
||||
padding: EdgeInsets.only(bottom: 8),
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: AvesFilterChip(
|
||||
filter: filter,
|
||||
|
@ -68,13 +68,13 @@ class FilterTable extends StatelessWidget {
|
|||
),
|
||||
Text(
|
||||
'$count',
|
||||
style: const TextStyle(color: Colors.white70),
|
||||
style: TextStyle(color: Colors.white70),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
],
|
||||
);
|
||||
}).toList(),
|
||||
columnWidths: const {
|
||||
columnWidths: {
|
||||
0: MaxColumnWidth(IntrinsicColumnWidth(), FixedColumnWidth(chipWidth)),
|
||||
2: MaxColumnWidth(IntrinsicColumnWidth(), FixedColumnWidth(countWidth)),
|
||||
},
|
||||
|
|
|
@ -49,7 +49,7 @@ class StatsPage extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
Widget child;
|
||||
if (collection.isEmpty) {
|
||||
child = const EmptyContent(
|
||||
child = EmptyContent(
|
||||
icon: AIcons.image,
|
||||
text: 'No images',
|
||||
);
|
||||
|
@ -71,7 +71,7 @@ class StatsPage extends StatelessWidget {
|
|||
final textScaleFactor = MediaQuery.textScaleFactorOf(context);
|
||||
final lineHeight = 16 * textScaleFactor;
|
||||
final locationIndicator = Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Column(
|
||||
children: [
|
||||
LinearPercentIndicator(
|
||||
|
@ -80,12 +80,12 @@ class StatsPage extends StatelessWidget {
|
|||
backgroundColor: Colors.white24,
|
||||
progressColor: Theme.of(context).accentColor,
|
||||
animation: true,
|
||||
leading: const Icon(AIcons.location),
|
||||
leading: Icon(AIcons.location),
|
||||
// right padding to match leading, so that inside label is aligned with outside label below
|
||||
padding: EdgeInsets.symmetric(horizontal: lineHeight) + const EdgeInsets.only(right: 24),
|
||||
padding: EdgeInsets.symmetric(horizontal: lineHeight) + EdgeInsets.only(right: 24),
|
||||
center: Text(NumberFormat.percentPattern().format(withGpsPercent)),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SizedBox(height: 8),
|
||||
Text('${withGps.length} ${Intl.plural(withGps.length, one: 'item', other: 'items')} with location'),
|
||||
],
|
||||
),
|
||||
|
@ -103,7 +103,7 @@ class StatsPage extends StatelessWidget {
|
|||
return MediaQueryDataProvider(
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Stats'),
|
||||
title: Text('Stats'),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: child,
|
||||
|
@ -118,7 +118,7 @@ class StatsPage extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget _buildMimeDonut(BuildContext context, String Function(num) label, Map<String, num> byMimeTypes) {
|
||||
if (byMimeTypes.isEmpty) return const SizedBox.shrink();
|
||||
if (byMimeTypes.isEmpty) return SizedBox.shrink();
|
||||
|
||||
final sum = byMimeTypes.values.fold<int>(0, (prev, v) => prev + v);
|
||||
|
||||
|
@ -177,12 +177,12 @@ class StatsPage extends StatelessWidget {
|
|||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.only(end: 8),
|
||||
padding: EdgeInsetsDirectional.only(end: 8),
|
||||
child: Icon(AIcons.disc, color: stringToColor(kv.key)),
|
||||
),
|
||||
),
|
||||
TextSpan(text: '${kv.key} '),
|
||||
TextSpan(text: '${kv.value}', style: const TextStyle(color: Colors.white70)),
|
||||
TextSpan(text: '${kv.value}', style: TextStyle(color: Colors.white70)),
|
||||
],
|
||||
),
|
||||
overflow: TextOverflow.fade,
|
||||
|
@ -217,7 +217,7 @@ class StatsPage extends StatelessWidget {
|
|||
|
||||
return [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Text(
|
||||
title,
|
||||
style: Constants.titleTextStyle,
|
||||
|
|
|
@ -32,11 +32,11 @@ class _WelcomePageState extends State<WelcomePage> {
|
|||
body: SafeArea(
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: FutureBuilder<String>(
|
||||
future: _termsLoader,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasError || snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
if (snapshot.hasError || snapshot.connectionState != ConnectionState.done) return SizedBox.shrink();
|
||||
final terms = snapshot.data;
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
@ -73,21 +73,21 @@ class _WelcomePageState extends State<WelcomePage> {
|
|||
return [
|
||||
...(MediaQuery.of(context).orientation == Orientation.portrait
|
||||
? [
|
||||
const AvesLogo(size: 64),
|
||||
const SizedBox(height: 16),
|
||||
AvesLogo(size: 64),
|
||||
SizedBox(height: 16),
|
||||
message,
|
||||
]
|
||||
: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const AvesLogo(size: 48),
|
||||
const SizedBox(width: 16),
|
||||
AvesLogo(size: 48),
|
||||
SizedBox(width: 16),
|
||||
message,
|
||||
],
|
||||
)
|
||||
]),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(height: 16),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -98,14 +98,14 @@ class _WelcomePageState extends State<WelcomePage> {
|
|||
text: 'I agree to the terms and conditions',
|
||||
);
|
||||
final button = RaisedButton(
|
||||
child: const Text('Continue'),
|
||||
child: Text('Continue'),
|
||||
onPressed: _hasAcceptedTerms
|
||||
? () {
|
||||
settings.hasAcceptedTerms = true;
|
||||
Navigator.pushAndRemoveUntil(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const HomePage(),
|
||||
builder: (context) => HomePage(),
|
||||
),
|
||||
(route) => false,
|
||||
);
|
||||
|
@ -118,11 +118,11 @@ class _WelcomePageState extends State<WelcomePage> {
|
|||
button,
|
||||
]
|
||||
: [
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(height: 16),
|
||||
Row(
|
||||
children: [
|
||||
checkbox,
|
||||
const Spacer(),
|
||||
Spacer(),
|
||||
button,
|
||||
],
|
||||
),
|
||||
|
@ -135,7 +135,7 @@ class _WelcomePageState extends State<WelcomePage> {
|
|||
borderRadius: BorderRadius.circular(16),
|
||||
color: Colors.white10,
|
||||
),
|
||||
constraints: const BoxConstraints(maxWidth: 460),
|
||||
constraints: BoxConstraints(maxWidth: 460),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: Markdown(
|
||||
|
|
Loading…
Reference in a new issue