use outline material icons
This commit is contained in:
parent
73bb51895f
commit
737656730a
14 changed files with 59 additions and 35 deletions
|
@ -6,6 +6,7 @@ import 'package:aves/widgets/common/providers/media_query_data_provider.dart';
|
|||
import 'package:aves/widgets/common/providers/media_store_collection_provider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
import 'package:pedantic/pedantic.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:screen/screen.dart';
|
||||
|
@ -81,7 +82,7 @@ class _HomePageState extends State<HomePage> {
|
|||
child: FutureBuilder(
|
||||
future: _appSetup,
|
||||
builder: (context, AsyncSnapshot<void> snapshot) {
|
||||
if (snapshot.hasError) return const Icon(Icons.error);
|
||||
if (snapshot.hasError) return const Icon(OMIcons.error);
|
||||
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
|
||||
debugPrint('$runtimeType FutureBuilder builder');
|
||||
return const MediaStoreCollectionPage();
|
||||
|
|
|
@ -7,6 +7,7 @@ import 'package:aves/widgets/album/filtered_collection_page.dart';
|
|||
import 'package:aves/widgets/common/icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class AllCollectionDrawer extends StatelessWidget {
|
||||
|
@ -33,19 +34,19 @@ class AllCollectionDrawer extends StatelessWidget {
|
|||
|
||||
final videoEntry = _FilteredCollectionNavTile(
|
||||
collection: collection,
|
||||
leading: const Icon(Icons.video_library),
|
||||
leading: const Icon(OMIcons.videoLibrary),
|
||||
title: 'Videos',
|
||||
filter: (entry) => entry.isVideo,
|
||||
);
|
||||
final buildAlbumEntry = (album) => _FilteredCollectionNavTile(
|
||||
collection: collection,
|
||||
leading: IconUtils.getAlbumIcon(context, album) ?? const Icon(Icons.photo_album),
|
||||
leading: IconUtils.getAlbumIcon(context, album) ?? const Icon(OMIcons.photoAlbum),
|
||||
title: collection.getUniqueAlbumName(album, collection.sortedAlbums),
|
||||
filter: (entry) => entry.directory == album,
|
||||
);
|
||||
final buildTagEntry = (tag) => _FilteredCollectionNavTile(
|
||||
collection: collection,
|
||||
leading: const Icon(Icons.label),
|
||||
leading: const Icon(OMIcons.label),
|
||||
title: tag,
|
||||
filter: (entry) => entry.xmpSubjects.contains(tag),
|
||||
);
|
||||
|
@ -92,22 +93,22 @@ class AllCollectionDrawer extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(children: [
|
||||
const Icon(Icons.photo_library),
|
||||
const Icon(OMIcons.photoLibrary),
|
||||
const SizedBox(width: 4),
|
||||
Text('${collection.imageCount}'),
|
||||
]),
|
||||
Row(children: [
|
||||
const Icon(Icons.video_library),
|
||||
const Icon(OMIcons.videoLibrary),
|
||||
const SizedBox(width: 4),
|
||||
Text('${collection.videoCount}'),
|
||||
]),
|
||||
Row(children: [
|
||||
const Icon(Icons.photo_album),
|
||||
const Icon(OMIcons.photoAlbum),
|
||||
const SizedBox(width: 4),
|
||||
Text('${collection.albumCount}'),
|
||||
]),
|
||||
Row(children: [
|
||||
const Icon(Icons.label),
|
||||
const Icon(OMIcons.label),
|
||||
const SizedBox(width: 4),
|
||||
Text('${collection.tagCount}'),
|
||||
]),
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:aves/widgets/album/thumbnail_collection.dart';
|
|||
import 'package:aves/widgets/common/menu_row.dart';
|
||||
import 'package:aves/widgets/debug_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class AllCollectionPage extends StatelessWidget {
|
||||
|
@ -20,7 +21,7 @@ class AllCollectionPage extends StatelessWidget {
|
|||
title: const Text('All'),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.search),
|
||||
icon: Icon(OMIcons.search),
|
||||
onPressed: () => showSearch(
|
||||
context: context,
|
||||
delegate: ImageSearchDelegate(collection),
|
||||
|
@ -54,7 +55,7 @@ class AllCollectionPage extends StatelessWidget {
|
|||
],
|
||||
PopupMenuItem(
|
||||
value: AlbumAction.debug,
|
||||
child: MenuRow(text: 'Debug', icon: Icons.whatshot),
|
||||
child: MenuRow(text: 'Debug', icon: OMIcons.whatshot),
|
||||
),
|
||||
],
|
||||
onSelected: (action) => _onActionSelected(context, collection, action),
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:aves/model/image_entry.dart';
|
|||
import 'package:aves/widgets/album/thumbnail_collection.dart';
|
||||
import 'package:aves/widgets/common/providers/media_query_data_provider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
|
||||
class ImageSearchDelegate extends SearchDelegate<ImageEntry> {
|
||||
final ImageCollection collection;
|
||||
|
@ -32,7 +33,7 @@ class ImageSearchDelegate extends SearchDelegate<ImageEntry> {
|
|||
if (query.isNotEmpty)
|
||||
IconButton(
|
||||
tooltip: 'Clear',
|
||||
icon: Icon(Icons.clear),
|
||||
icon: Icon(OMIcons.clear),
|
||||
onPressed: () {
|
||||
query = '';
|
||||
showSuggestions(context);
|
||||
|
@ -78,14 +79,18 @@ class _EmptyContent extends StatelessWidget {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: const [
|
||||
Icon(
|
||||
Icons.photo,
|
||||
OMIcons.photo,
|
||||
size: 64,
|
||||
color: color,
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
'No match',
|
||||
style: TextStyle(color: color),
|
||||
style: TextStyle(
|
||||
color: color,
|
||||
fontSize: 22,
|
||||
fontFamily: 'Concourse',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:aves/model/image_entry.dart';
|
|||
import 'package:aves/utils/android_file_utils.dart';
|
||||
import 'package:aves/widgets/common/app_icon.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class VideoIcon extends StatelessWidget {
|
||||
|
@ -15,7 +16,7 @@ class VideoIcon extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return OverlayIcon(
|
||||
icon: Icons.play_circle_outline,
|
||||
icon: OMIcons.playCircleOutline,
|
||||
iconSize: iconSize,
|
||||
text: entry.durationText,
|
||||
);
|
||||
|
@ -30,7 +31,7 @@ class GifIcon extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return OverlayIcon(
|
||||
icon: Icons.gif,
|
||||
icon: OMIcons.gif,
|
||||
iconSize: iconSize,
|
||||
);
|
||||
}
|
||||
|
@ -44,7 +45,7 @@ class GpsIcon extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return OverlayIcon(
|
||||
icon: Icons.place,
|
||||
icon: OMIcons.place,
|
||||
iconSize: iconSize,
|
||||
);
|
||||
}
|
||||
|
@ -90,10 +91,10 @@ class IconUtils {
|
|||
static Widget getAlbumIcon(BuildContext context, String albumDirectory) {
|
||||
switch (androidFileUtils.getAlbumType(albumDirectory)) {
|
||||
case AlbumType.Camera:
|
||||
return Icon(Icons.photo_camera);
|
||||
return Icon(OMIcons.photoCamera);
|
||||
case AlbumType.Screenshots:
|
||||
case AlbumType.ScreenRecordings:
|
||||
return Icon(Icons.smartphone);
|
||||
return Icon(OMIcons.smartphone);
|
||||
case AlbumType.Download:
|
||||
return Icon(Icons.file_download);
|
||||
case AlbumType.App:
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:after_init/after_init.dart';
|
|||
import 'package:aves/model/image_entry.dart';
|
||||
import 'package:aves/model/image_file_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:transparent_image/transparent_image.dart';
|
||||
|
||||
|
@ -84,7 +85,7 @@ class ImagePreviewState extends State<ImagePreview> with AfterInitMixin {
|
|||
? widget.builder(bytes)
|
||||
: Center(
|
||||
child: Icon(
|
||||
Icons.error,
|
||||
OMIcons.error,
|
||||
color: Colors.blueGrey,
|
||||
),
|
||||
);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
|
||||
class MenuRow extends StatelessWidget {
|
||||
final String text;
|
||||
|
@ -19,7 +20,7 @@ class MenuRow extends StatelessWidget {
|
|||
if (checked != null) ...[
|
||||
Opacity(
|
||||
opacity: checked ? 1 : 0,
|
||||
child: Icon(Icons.done),
|
||||
child: Icon(OMIcons.done),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
],
|
||||
|
|
|
@ -7,6 +7,7 @@ import 'package:aves/widgets/fullscreen/info/location_section.dart';
|
|||
import 'package:aves/widgets/fullscreen/info/metadata_section.dart';
|
||||
import 'package:aves/widgets/fullscreen/info/xmp_section.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
|
@ -41,7 +42,7 @@ class InfoPageState extends State<InfoPage> {
|
|||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_upward),
|
||||
icon: const Icon(OMIcons.arrowUpward),
|
||||
onPressed: () => BackUpNotification().dispatch(context),
|
||||
tooltip: 'Back to image',
|
||||
),
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:aves/utils/android_app_service.dart';
|
|||
import 'package:aves/widgets/fullscreen/info/info_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
|
||||
class LocationSection extends AnimatedWidget {
|
||||
final ImageEntry entry;
|
||||
|
@ -118,17 +119,17 @@ class ImageMapState extends State<ImageMap> with AutomaticKeepAliveClientMixin {
|
|||
const SizedBox(width: 8),
|
||||
Column(children: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.add),
|
||||
icon: Icon(OMIcons.add),
|
||||
onPressed: _controller == null ? null : () => _zoomBy(1),
|
||||
tooltip: 'Zoom in',
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.remove),
|
||||
icon: Icon(OMIcons.remove),
|
||||
onPressed: _controller == null ? null : () => _zoomBy(-1),
|
||||
tooltip: 'Zoom out',
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.open_in_new),
|
||||
icon: Icon(OMIcons.openInNew),
|
||||
onPressed: () => AndroidAppService.openMap(widget.geoUri),
|
||||
tooltip: 'Show on map...',
|
||||
),
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'package:aves/utils/geo_utils.dart';
|
|||
import 'package:aves/widgets/common/fx/blurred.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
|
@ -202,7 +203,7 @@ class _LocationRow extends StatelessWidget {
|
|||
}
|
||||
return Row(
|
||||
children: [
|
||||
const Icon(Icons.place, size: _iconSize),
|
||||
const Icon(OMIcons.place, size: _iconSize),
|
||||
const SizedBox(width: _iconPadding),
|
||||
Expanded(child: Text(location, strutStyle: Constants.overflowStrutStyle)),
|
||||
],
|
||||
|
@ -222,7 +223,7 @@ class _DateRow extends StatelessWidget {
|
|||
final resolution = '${entry.width} × ${entry.height}';
|
||||
return Row(
|
||||
children: [
|
||||
const Icon(Icons.calendar_today, size: _iconSize),
|
||||
const Icon(OMIcons.calendarToday, size: _iconSize),
|
||||
const SizedBox(width: _iconPadding),
|
||||
Expanded(flex: 3, child: Text(dateText, strutStyle: Constants.overflowStrutStyle)),
|
||||
Expanded(flex: 2, child: Text(resolution, strutStyle: Constants.overflowStrutStyle)),
|
||||
|
@ -240,7 +241,7 @@ class _ShootingRow extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
const Icon(Icons.camera, size: _iconSize),
|
||||
const Icon(OMIcons.camera, size: _iconSize),
|
||||
const SizedBox(width: _iconPadding),
|
||||
Expanded(child: Text(details.aperture, strutStyle: Constants.overflowStrutStyle)),
|
||||
Expanded(child: Text(details.exposureTime, strutStyle: Constants.overflowStrutStyle)),
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:aves/widgets/common/menu_row.dart';
|
|||
import 'package:aves/widgets/fullscreen/fullscreen_action_delegate.dart';
|
||||
import 'package:aves/widgets/fullscreen/overlay/common.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
|
||||
class FullscreenTopOverlay extends StatelessWidget {
|
||||
final List<ImageEntry> entries;
|
||||
|
@ -39,7 +40,7 @@ class FullscreenTopOverlay extends StatelessWidget {
|
|||
OverlayButton(
|
||||
scale: scale,
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.share),
|
||||
icon: Icon(OMIcons.share),
|
||||
onPressed: () => onActionSelected?.call(FullscreenAction.share),
|
||||
tooltip: 'Share',
|
||||
),
|
||||
|
@ -48,7 +49,7 @@ class FullscreenTopOverlay extends StatelessWidget {
|
|||
OverlayButton(
|
||||
scale: scale,
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.delete_outline),
|
||||
icon: Icon(OMIcons.delete),
|
||||
onPressed: () => onActionSelected?.call(FullscreenAction.delete),
|
||||
tooltip: 'Delete',
|
||||
),
|
||||
|
@ -60,26 +61,26 @@ class FullscreenTopOverlay extends StatelessWidget {
|
|||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: FullscreenAction.info,
|
||||
child: MenuRow(text: 'Info', icon: Icons.info_outline),
|
||||
child: MenuRow(text: 'Info', icon: OMIcons.info),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: FullscreenAction.rename,
|
||||
child: MenuRow(text: 'Rename', icon: Icons.title),
|
||||
child: MenuRow(text: 'Rename', icon: OMIcons.title),
|
||||
),
|
||||
if (entry.canRotate)
|
||||
PopupMenuItem(
|
||||
value: FullscreenAction.rotateCCW,
|
||||
child: MenuRow(text: 'Rotate left', icon: Icons.rotate_left),
|
||||
child: MenuRow(text: 'Rotate left', icon: OMIcons.rotateLeft),
|
||||
),
|
||||
if (entry.canRotate)
|
||||
PopupMenuItem(
|
||||
value: FullscreenAction.rotateCW,
|
||||
child: MenuRow(text: 'Rotate right', icon: Icons.rotate_right),
|
||||
child: MenuRow(text: 'Rotate right', icon: OMIcons.rotateRight),
|
||||
),
|
||||
if (entry.canPrint)
|
||||
PopupMenuItem(
|
||||
value: FullscreenAction.print,
|
||||
child: MenuRow(text: 'Print', icon: Icons.print),
|
||||
child: MenuRow(text: 'Print', icon: OMIcons.print),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
const PopupMenuItem(
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:aves/utils/time_utils.dart';
|
|||
import 'package:aves/widgets/common/fx/blurred.dart';
|
||||
import 'package:aves/widgets/fullscreen/overlay/common.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:outline_material_icons/outline_material_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
|
@ -99,7 +100,7 @@ class VideoControlOverlayState extends State<VideoControlOverlay> with SingleTic
|
|||
OverlayButton(
|
||||
scale: scale,
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.open_in_new),
|
||||
icon: Icon(OMIcons.openInNew),
|
||||
onPressed: () => AndroidAppService.open(entry.uri, entry.mimeType),
|
||||
tooltip: 'Open',
|
||||
),
|
||||
|
|
|
@ -181,6 +181,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.0.4"
|
||||
outline_material_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: outline_material_icons
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.1"
|
||||
path:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
@ -31,6 +31,7 @@ dependencies:
|
|||
google_maps_flutter:
|
||||
intl:
|
||||
logger:
|
||||
outline_material_icons:
|
||||
path:
|
||||
pdf:
|
||||
pedantic:
|
||||
|
|
Loading…
Reference in a new issue