use material symbols over material icons
This commit is contained in:
parent
e3ece7425f
commit
f123faeee8
16 changed files with 237 additions and 187 deletions
|
@ -226,6 +226,11 @@ class Dependencies {
|
|||
license: mit,
|
||||
sourceUrl: 'https://github.com/ziofat/material_design_icons_flutter',
|
||||
),
|
||||
Dependency(
|
||||
name: 'Material Symbols Icons for Flutter',
|
||||
license: apache2,
|
||||
sourceUrl: 'https://github.com/timmaffett/material_symbols_icons',
|
||||
),
|
||||
Dependency(
|
||||
name: 'Overlay Support',
|
||||
license: apache2,
|
||||
|
|
|
@ -1,213 +1,211 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
class AIcons {
|
||||
static const allCollection = Icons.collections_outlined;
|
||||
static const image = Icons.photo_outlined;
|
||||
static const video = Icons.movie_outlined;
|
||||
static const vector = Icons.code_outlined;
|
||||
static const allCollection = Symbols.collections;
|
||||
static const image = Symbols.photo;
|
||||
static const video = Symbols.movie;
|
||||
static const vector = Symbols.code;
|
||||
|
||||
static const accessibility = Icons.accessibility_new_outlined;
|
||||
static const android = Icons.android;
|
||||
static const app = Icons.apps_outlined;
|
||||
static const apply = Icons.done_outlined;
|
||||
static const aspectRatio = Icons.aspect_ratio_outlined;
|
||||
static const bin = Icons.delete_outlined;
|
||||
static const broken = Icons.broken_image_outlined;
|
||||
static const brightnessMin = Icons.brightness_low_outlined;
|
||||
static const brightnessMax = Icons.brightness_high_outlined;
|
||||
static const checked = Icons.done_outlined;
|
||||
static const accessibility = Symbols.accessibility_new;
|
||||
static const android = Symbols.android;
|
||||
static const app = Symbols.apps;
|
||||
static const apply = Symbols.done;
|
||||
static const aspectRatio = Symbols.aspect_ratio;
|
||||
static const bin = Symbols.delete;
|
||||
static const broken = Symbols.broken_image;
|
||||
static const brightnessMin = Symbols.brightness_low;
|
||||
static const brightnessMax = Symbols.brightness_high;
|
||||
static const checked = Symbols.done;
|
||||
static const circle = Symbols.fiber_manual_record;
|
||||
static final count = MdiIcons.counter;
|
||||
static const counter = Icons.plus_one_outlined;
|
||||
static const description = Icons.description_outlined;
|
||||
static const descriptionUntitled = Icons.comments_disabled_outlined;
|
||||
static const disc = Icons.fiber_manual_record;
|
||||
static const display = Icons.light_mode_outlined;
|
||||
static const duration = Icons.timelapse_outlined;
|
||||
static const error = Icons.error_outline;
|
||||
static const explorer = Icons.account_tree_outlined;
|
||||
static const folder = Icons.folder_outlined;
|
||||
static const counter = Symbols.plus_one;
|
||||
static const description = Symbols.description;
|
||||
static const descriptionUntitled = Symbols.comments_disabled;
|
||||
static const display = Symbols.light_mode;
|
||||
static const duration = Symbols.timelapse;
|
||||
static const error = Symbols.error;
|
||||
static const explorer = Symbols.account_tree;
|
||||
static const folder = Symbols.folder;
|
||||
static final github = MdiIcons.github;
|
||||
static const home = Icons.home_outlined;
|
||||
static const home = Symbols.home;
|
||||
|
||||
// as of Flutter v3.16.3,
|
||||
// `label_important_outlined` matches text direction but is filled
|
||||
// `label_important_outline` is outlined but does not match text direction
|
||||
static const important = IconData(labelImportantOutlineCodePoint, fontFamily: materialIconsFontFamily, matchTextDirection: true);
|
||||
|
||||
static const language = Icons.translate_outlined;
|
||||
static const language = Symbols.translate;
|
||||
static final legal = MdiIcons.scaleBalance;
|
||||
static const mimeType = Icons.code_outlined;
|
||||
static const name = Icons.abc_outlined;
|
||||
static const newTier = Icons.fiber_new_outlined;
|
||||
static const opacity = Icons.opacity;
|
||||
static const palette = Icons.palette_outlined;
|
||||
static final privacy = MdiIcons.shieldAccountOutline;
|
||||
static const rating = Icons.star_border_outlined;
|
||||
static const ratingFull = Icons.star;
|
||||
static const mimeType = Symbols.code;
|
||||
static const name = Symbols.abc;
|
||||
static const newTier = Symbols.fiber_new;
|
||||
static const opacity = Symbols.opacity;
|
||||
static const palette = Symbols.palette;
|
||||
static const privacy = Symbols.shield_person;
|
||||
static const rating = Symbols.star;
|
||||
static final ratingRejected = MdiIcons.starMinusOutline;
|
||||
static final ratingUnrated = MdiIcons.starOffOutline;
|
||||
static const raw = Icons.raw_on_outlined;
|
||||
static const sensorControlEnabled = Icons.explore_outlined;
|
||||
static const sensorControlDisabled = Icons.explore_off_outlined;
|
||||
static const settings = Icons.settings_outlined;
|
||||
static const shooting = Icons.camera_outlined;
|
||||
static const size = Icons.data_usage_outlined;
|
||||
static const storageCard = Icons.sd_storage_outlined;
|
||||
static const storageMain = Icons.smartphone_outlined;
|
||||
static const streamVideo = Icons.movie_outlined;
|
||||
static const streamAudio = Icons.audiotrack_outlined;
|
||||
static const streamText = Icons.closed_caption_outlined;
|
||||
static const tag = Icons.local_offer_outlined;
|
||||
static const raw = Symbols.raw_on;
|
||||
static const sensorControlEnabled = Symbols.explore;
|
||||
static const sensorControlDisabled = Symbols.explore_off;
|
||||
static const settings = Symbols.settings;
|
||||
static const shooting = Symbols.camera;
|
||||
static const size = Symbols.data_usage;
|
||||
static const storageCard = Symbols.sd_storage;
|
||||
static const storageMain = Symbols.smartphone;
|
||||
static const streamVideo = Symbols.movie;
|
||||
static const streamAudio = Symbols.audiotrack;
|
||||
static const streamText = Symbols.closed_caption;
|
||||
static const tag = Symbols.sell;
|
||||
static final tagUntagged = MdiIcons.tagOffOutline;
|
||||
static const text = Icons.format_quote_outlined;
|
||||
static const thumbnails = Icons.grid_on_outlined;
|
||||
static const volumeMin = Icons.volume_mute_outlined;
|
||||
static const volumeMax = Icons.volume_up_outlined;
|
||||
static const text = Symbols.format_quote;
|
||||
static const thumbnails = Symbols.grid_on;
|
||||
static const volumeMin = Symbols.volume_mute;
|
||||
static const volumeMax = Symbols.volume_up;
|
||||
|
||||
// time/space
|
||||
static const date = Icons.calendar_today_outlined;
|
||||
static const dateByDay = Icons.today_outlined;
|
||||
static const dateByMonth = Icons.calendar_month_outlined;
|
||||
static const dateRecent = Icons.today_outlined;
|
||||
static const dateUndated = Icons.event_busy_outlined;
|
||||
static const geoBounds = Icons.public_outlined;
|
||||
static const location = Icons.place_outlined;
|
||||
static const locationUnlocated = Icons.location_off_outlined;
|
||||
static const country = Icons.flag_outlined;
|
||||
static const state = Icons.flag_outlined;
|
||||
static const place = Icons.place_outlined;
|
||||
static const date = Symbols.calendar_today;
|
||||
static const dateByDay = Symbols.today;
|
||||
static const dateByMonth = Symbols.calendar_month;
|
||||
static const dateRecent = Symbols.today;
|
||||
static const dateUndated = Symbols.event_busy;
|
||||
static const geoBounds = Symbols.public;
|
||||
static const location = Symbols.place;
|
||||
static const locationUnlocated = Symbols.location_off;
|
||||
static const country = Symbols.flag;
|
||||
static const state = Symbols.flag;
|
||||
static const place = Symbols.place;
|
||||
|
||||
// view
|
||||
static const group = Icons.group_work_outlined;
|
||||
static const layout = Icons.grid_view_outlined;
|
||||
static const layoutMosaic = Icons.view_comfy_outlined;
|
||||
static const layoutGrid = Icons.view_compact_outlined;
|
||||
static const layoutList = Icons.list_outlined;
|
||||
static const sort = Icons.sort_outlined;
|
||||
static const sortOrder = Icons.swap_vert_outlined;
|
||||
static const thumbnailLarge = Icons.photo_size_select_large_outlined;
|
||||
static const thumbnailSmall = Icons.photo_size_select_small_outlined;
|
||||
static const group = Symbols.group_work;
|
||||
static const layout = Symbols.grid_view;
|
||||
static const layoutMosaic = Symbols.view_comfy;
|
||||
static const layoutGrid = Symbols.view_compact;
|
||||
static const layoutList = Symbols.list;
|
||||
static const sort = Symbols.sort;
|
||||
static const sortOrder = Symbols.swap_vert;
|
||||
static const thumbnailLarge = Symbols.photo_size_select_large;
|
||||
static const thumbnailSmall = Symbols.photo_size_select_small;
|
||||
|
||||
// actions
|
||||
static const add = Icons.add_circle_outline;
|
||||
static const addShortcut = Icons.add_to_home_screen_outlined;
|
||||
static const cancel = Icons.cancel_outlined;
|
||||
static const cast = Icons.cast_outlined;
|
||||
static const clear = Icons.clear_outlined;
|
||||
static const clipboard = Icons.content_copy_outlined;
|
||||
static const convert = Icons.transform_outlined;
|
||||
static const add = Symbols.add_circle;
|
||||
static const addShortcut = Symbols.add_to_home_screen;
|
||||
static const cancel = Symbols.cancel;
|
||||
static const cast = Symbols.cast;
|
||||
static const clear = Symbols.clear;
|
||||
static const clipboard = Symbols.content_copy;
|
||||
static const convert = Symbols.transform;
|
||||
static final convertToStillImage = MdiIcons.movieRemoveOutline;
|
||||
static const copy = Icons.file_copy_outlined;
|
||||
static const debug = Icons.whatshot_outlined;
|
||||
static const delete = Icons.delete_outlined;
|
||||
static const edit = Icons.edit_outlined;
|
||||
static const emptyBin = Icons.delete_sweep_outlined;
|
||||
static const export = Icons.open_with_outlined;
|
||||
static const copy = Symbols.file_copy;
|
||||
static const debug = Symbols.mode_heat;
|
||||
static const delete = Symbols.delete;
|
||||
static const edit = Symbols.edit;
|
||||
static const emptyBin = Symbols.delete_sweep;
|
||||
static const export = Symbols.open_with;
|
||||
static final fileExport = MdiIcons.fileExportOutline;
|
||||
static final fileImport = MdiIcons.fileImportOutline;
|
||||
static const flip = Icons.flip_outlined;
|
||||
static const favourite = Icons.favorite_border;
|
||||
static const favouriteActive = Icons.favorite;
|
||||
static final filter = MdiIcons.filterOutline;
|
||||
static final filterOff = MdiIcons.filterOffOutline;
|
||||
static const goUp = Icons.arrow_upward_outlined;
|
||||
static const hide = Icons.visibility_off_outlined;
|
||||
static const info = Icons.info_outlined;
|
||||
static const layers = Icons.layers_outlined;
|
||||
static const map = Icons.map_outlined;
|
||||
static const more = Icons.more_horiz_outlined;
|
||||
static const flip = Symbols.flip;
|
||||
static const favourite = Symbols.favorite;
|
||||
static const filter = Symbols.filter_alt;
|
||||
static const filterOff = Symbols.filter_alt_off;
|
||||
static const goUp = Symbols.arrow_upward;
|
||||
static const hide = Symbols.visibility_off;
|
||||
static const info = Symbols.info;
|
||||
static const layers = Symbols.layers;
|
||||
static const map = Symbols.map;
|
||||
static const more = Symbols.more_horiz;
|
||||
static final move = MdiIcons.fileMoveOutline;
|
||||
static const rename = Icons.abc_outlined;
|
||||
static const openOutside = Icons.open_in_new_outlined;
|
||||
static final openVideoPlayer = MdiIcons.openInApp;
|
||||
static const rename = Symbols.abc;
|
||||
static const openOutside = Symbols.open_in_new;
|
||||
static final openVideoPart = MdiIcons.moviePlayOutline;
|
||||
static const pin = Icons.push_pin_outlined;
|
||||
static final unpin = MdiIcons.pinOffOutline;
|
||||
static const print = Icons.print_outlined;
|
||||
static const refresh = Icons.refresh_outlined;
|
||||
static const remove = Icons.remove_outlined;
|
||||
static const pin = Symbols.keep;
|
||||
static const unpin = Symbols.keep_off;
|
||||
static const print = Symbols.print;
|
||||
static const refresh = Symbols.refresh;
|
||||
static const remove = Symbols.remove;
|
||||
static final resetBounds = MdiIcons.rayStartEnd;
|
||||
static const reverse = Icons.invert_colors_outlined;
|
||||
static const reset = Icons.restart_alt_outlined;
|
||||
static const restore = Icons.restore_outlined;
|
||||
static const rotateLeft = Icons.rotate_left_outlined;
|
||||
static const rotateRight = Icons.rotate_right_outlined;
|
||||
static const rotateScreen = Icons.screen_rotation_outlined;
|
||||
static const search = Icons.search_outlined;
|
||||
static const select = Icons.select_all_outlined;
|
||||
static const setAs = Icons.wallpaper_outlined;
|
||||
static const reverse = Symbols.invert_colors;
|
||||
static const reset = Symbols.restart_alt;
|
||||
static const restore = Symbols.restore;
|
||||
static const rotateLeft = Symbols.rotate_left;
|
||||
static const rotateRight = Symbols.rotate_right;
|
||||
static const rotateScreen = Symbols.screen_rotation;
|
||||
static const search = Symbols.search;
|
||||
static const select = Symbols.select_all;
|
||||
static const setAs = Symbols.wallpaper;
|
||||
static final setBoundEnd = MdiIcons.rayEnd;
|
||||
static final setBoundStart = MdiIcons.rayStart;
|
||||
static final setCover = MdiIcons.imageEditOutline;
|
||||
static const share = Icons.share_outlined;
|
||||
static const show = Icons.visibility_outlined;
|
||||
static final showFullscreenArrows = MdiIcons.arrowExpand;
|
||||
static const showFullscreenCorners = Icons.fullscreen_outlined;
|
||||
static const slideshow = Icons.slideshow_outlined;
|
||||
static const split = Icons.call_split_outlined;
|
||||
static const stats = Icons.donut_small_outlined;
|
||||
static const vaultLock = Icons.lock_outlined;
|
||||
static const vaultAdd = Icons.enhanced_encryption_outlined;
|
||||
static const share = Symbols.share;
|
||||
static const show = Symbols.visibility;
|
||||
static const showFullscreenArrows = Symbols.open_in_full;
|
||||
static const showFullscreenCorners = Symbols.fullscreen;
|
||||
static const slideshow = Symbols.slideshow;
|
||||
static const split = Symbols.call_split;
|
||||
static const stats = Symbols.donut_small;
|
||||
static const vaultLock = Symbols.lock;
|
||||
static const vaultAdd = Symbols.enhanced_encryption;
|
||||
static final vaultConfigure = MdiIcons.shieldLockOutline;
|
||||
static const view = Icons.grid_view_outlined;
|
||||
static const viewerLock = Icons.lock_outlined;
|
||||
static const viewerUnlock = Icons.lock_open_outlined;
|
||||
static const zoomIn = Icons.add_outlined;
|
||||
static const zoomOut = Icons.remove_outlined;
|
||||
static const collapse = Icons.expand_less_outlined;
|
||||
static const expand = Icons.expand_more_outlined;
|
||||
static const up = Icons.keyboard_arrow_up_outlined;
|
||||
static const down = Icons.keyboard_arrow_down_outlined;
|
||||
static const previous = Icons.chevron_left_outlined;
|
||||
static const next = Icons.chevron_right_outlined;
|
||||
static const view = Symbols.grid_view;
|
||||
static const viewerLock = Symbols.lock;
|
||||
static const viewerUnlock = Symbols.lock_open;
|
||||
static const zoomIn = Symbols.add;
|
||||
static const zoomOut = Symbols.remove;
|
||||
static const collapse = Symbols.expand_less;
|
||||
static const expand = Symbols.expand_more;
|
||||
static const up = Symbols.keyboard_arrow_up;
|
||||
static const down = Symbols.keyboard_arrow_down;
|
||||
static const previous = Symbols.chevron_left;
|
||||
static const next = Symbols.chevron_right;
|
||||
|
||||
// video actions
|
||||
// `play` and `pause` icon should be consistent with `AnimatedIcons.play_pause`
|
||||
static const play = Icons.play_arrow;
|
||||
static const pause = Icons.pause;
|
||||
static const previousFrame = Icons.skip_previous_outlined;
|
||||
static const nextFrame = Icons.skip_next_outlined;
|
||||
static const replay10 = Icons.replay_10_outlined;
|
||||
static const skip10 = Icons.forward_10_outlined;
|
||||
static const mute = Icons.volume_off_outlined;
|
||||
static const unmute = Icons.volume_up_outlined;
|
||||
static const captureFrame = Icons.screenshot_outlined;
|
||||
static const repeat = Icons.repeat_outlined;
|
||||
static const play = Symbols.play_arrow;
|
||||
static const pause = Symbols.pause;
|
||||
static const previousFrame = Symbols.skip_previous;
|
||||
static const nextFrame = Symbols.skip_next;
|
||||
static const replay10 = Symbols.replay_10;
|
||||
static const skip10 = Symbols.forward_10;
|
||||
static const mute = Symbols.volume_off;
|
||||
static const unmute = Symbols.volume_up;
|
||||
static const captureFrame = Symbols.screenshot;
|
||||
static const repeat = Symbols.repeat;
|
||||
static final repeatOff = MdiIcons.repeatOff;
|
||||
static const selectStreams = Icons.translate_outlined;
|
||||
static const setSpeed = Icons.speed_outlined;
|
||||
static const videoSettings = Icons.video_settings_outlined;
|
||||
static const selectStreams = Symbols.translate;
|
||||
static const setSpeed = Symbols.speed;
|
||||
static const videoSettings = Symbols.video_settings;
|
||||
|
||||
// editor
|
||||
static const transform = Icons.crop_rotate_outlined;
|
||||
static const aspectRatioFree = Icons.crop_free_outlined;
|
||||
static const aspectRatioOriginal = Icons.crop_original_outlined;
|
||||
static const aspectRatioSquare = Icons.crop_square_outlined;
|
||||
static const aspectRatio_16_9 = Icons.crop_16_9_outlined;
|
||||
static const aspectRatio_4_3 = Icons.crop_landscape_outlined;
|
||||
static const transform = Symbols.crop_rotate;
|
||||
static const aspectRatioFree = Symbols.crop_free;
|
||||
static const aspectRatioOriginal = Symbols.crop_original;
|
||||
static const aspectRatioSquare = Symbols.crop_square;
|
||||
static const aspectRatio_16_9 = Symbols.crop_16_9;
|
||||
static const aspectRatio_4_3 = Symbols.crop_landscape;
|
||||
|
||||
// albums
|
||||
static const album = Icons.photo_album_outlined;
|
||||
static const dynamicAlbum = Icons.image_search_outlined;
|
||||
static const cameraAlbum = Icons.photo_camera_outlined;
|
||||
static const downloadAlbum = Icons.file_download;
|
||||
static const screenshotAlbum = Icons.screenshot_outlined;
|
||||
static const recordingAlbum = Icons.smartphone_outlined;
|
||||
static const locked = Icons.lock_outlined;
|
||||
static const unlocked = Icons.lock_open_outlined;
|
||||
static const album = Symbols.photo_album;
|
||||
static const dynamicAlbum = Symbols.image_search;
|
||||
static const cameraAlbum = Symbols.photo_camera;
|
||||
static const downloadAlbum = Symbols.file_download;
|
||||
static const screenshotAlbum = Symbols.screenshot;
|
||||
static const recordingAlbum = Symbols.smartphone;
|
||||
static const locked = Symbols.lock;
|
||||
static const unlocked = Symbols.lock_open;
|
||||
|
||||
// thumbnail overlay
|
||||
static const animated = Icons.slideshow;
|
||||
static const geo = Icons.language_outlined;
|
||||
static const hdr = Icons.hdr_on_outlined;
|
||||
static const motionPhoto = Icons.motion_photos_on_outlined;
|
||||
static const multiPage = Icons.burst_mode_outlined;
|
||||
static const panorama = Icons.vrpano_outlined;
|
||||
static const sphericalVideo = Icons.threesixty_outlined;
|
||||
static const videoThumb = Icons.play_circle_outlined;
|
||||
static const selected = Icons.check_circle_outlined;
|
||||
static const unselected = Icons.radio_button_unchecked;
|
||||
static const animated = Symbols.animated_images;
|
||||
static const geo = Symbols.language;
|
||||
static const hdr = Symbols.hdr_on;
|
||||
static const motionPhoto = Symbols.motion_photos_on;
|
||||
static const multiPage = Symbols.burst_mode;
|
||||
static const panorama = Symbols.vrpano;
|
||||
static const sphericalVideo = Symbols.threesixty;
|
||||
static const videoThumb = Symbols.play_circle;
|
||||
static const selected = Symbols.check_circle;
|
||||
static const unselected = Symbols.radio_button_unchecked;
|
||||
|
||||
// Material Icons references to make constant instances of `IconData`
|
||||
// as non-constant instances of `IconData` prevent icon font tree shaking
|
||||
|
|
|
@ -60,8 +60,10 @@ class Themes {
|
|||
dividerColor: colors.outlineVariant,
|
||||
scaffoldBackgroundColor: _schemeFirstLayer(colors),
|
||||
// TYPOGRAPHY & ICONOGRAPHY
|
||||
iconTheme: _iconTheme(colors),
|
||||
typography: _typography,
|
||||
// COMPONENT THEMES
|
||||
bottomNavigationBarTheme: _bottomNavigationBarTheme(colors),
|
||||
checkboxTheme: _checkboxTheme(colors),
|
||||
drawerTheme: _drawerTheme(colors),
|
||||
floatingActionButtonTheme: _floatingActionButtonTheme(colors),
|
||||
|
@ -79,6 +81,15 @@ class Themes {
|
|||
);
|
||||
}
|
||||
|
||||
static BottomNavigationBarThemeData _bottomNavigationBarTheme(ColorScheme colors) {
|
||||
final iconTheme = _iconTheme(colors);
|
||||
return BottomNavigationBarThemeData(
|
||||
elevation: 0,
|
||||
selectedIconTheme: iconTheme.copyWith(color: colors.primary),
|
||||
unselectedIconTheme: iconTheme.copyWith(color: _unselectedWidgetColor(colors)),
|
||||
);
|
||||
}
|
||||
|
||||
static CheckboxThemeData _checkboxTheme(ColorScheme colors) => CheckboxThemeData(
|
||||
side: BorderSide(width: 2.0, color: _unselectedWidgetColor(colors)),
|
||||
);
|
||||
|
@ -87,6 +98,16 @@ class Themes {
|
|||
backgroundColor: _schemeSecondLayer(colors),
|
||||
);
|
||||
|
||||
static IconThemeData _iconTheme(ColorScheme colors) => IconThemeData(
|
||||
// increased weight (from default 400 to 600)
|
||||
// applied to variable fonts from `material_symbols_icons`,
|
||||
// to match the fixed-weight icons from `material_design_icons_flutter`
|
||||
weight: 600,
|
||||
grade: 0,
|
||||
opticalSize: 48,
|
||||
color: colors.onSurface,
|
||||
);
|
||||
|
||||
static const _listTileTheme = ListTileThemeData(
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 16),
|
||||
);
|
||||
|
|
|
@ -126,7 +126,7 @@ extension ExtraEntryActionView on EntryAction {
|
|||
// external
|
||||
EntryAction.edit => AIcons.edit,
|
||||
EntryAction.open => AIcons.openOutside,
|
||||
EntryAction.openVideoPlayer => AIcons.openVideoPlayer,
|
||||
EntryAction.openVideoPlayer => AIcons.openOutside,
|
||||
EntryAction.openMap => AIcons.map,
|
||||
EntryAction.setAs => AIcons.setAs,
|
||||
EntryAction.cast => AIcons.cast,
|
||||
|
|
|
@ -69,12 +69,13 @@ class _RateQuickChooserState extends State<RateQuickChooser> {
|
|||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: List.generate(5, (i) {
|
||||
final thisRating = i + 1;
|
||||
final disabled = _rating < i + 1;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Icon(
|
||||
_rating < thisRating ? AIcons.rating : AIcons.ratingFull,
|
||||
color: _rating < thisRating ? AColors.starDisabled : AColors.starEnabled,
|
||||
AIcons.rating,
|
||||
fill: disabled ? 0 : 1,
|
||||
color: disabled ? AColors.starDisabled : AColors.starEnabled,
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
|
|
|
@ -34,9 +34,8 @@ class _FavouriteTogglerState extends State<FavouriteToggler> {
|
|||
|
||||
Set<AvesEntry> get entries => widget.entries;
|
||||
|
||||
static const isFavouriteIcon = AIcons.favouriteActive;
|
||||
static const isNotFavouriteIcon = AIcons.favourite;
|
||||
static const favouriteSweeperIcon = AIcons.favourite;
|
||||
static const isFavouriteIcon = Icon(AIcons.favourite, fill: 1);
|
||||
static const isNotFavouriteIcon = Icon(AIcons.favourite, fill: 0);
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -67,11 +66,11 @@ class _FavouriteTogglerState extends State<FavouriteToggler> {
|
|||
return isFavourite
|
||||
? MenuRow(
|
||||
text: context.l10n.entryActionRemoveFavourite,
|
||||
icon: const Icon(isFavouriteIcon),
|
||||
icon: isFavouriteIcon,
|
||||
)
|
||||
: MenuRow(
|
||||
text: context.l10n.entryActionAddFavourite,
|
||||
icon: const Icon(isNotFavouriteIcon),
|
||||
icon: isNotFavouriteIcon,
|
||||
);
|
||||
}
|
||||
final animate = context.select<Settings, bool>((v) => v.animate);
|
||||
|
@ -79,7 +78,7 @@ class _FavouriteTogglerState extends State<FavouriteToggler> {
|
|||
alignment: Alignment.center,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(isFavourite ? isFavouriteIcon : isNotFavouriteIcon),
|
||||
icon: isFavourite ? isFavouriteIcon : isNotFavouriteIcon,
|
||||
onPressed: widget.onPressed,
|
||||
focusNode: widget.focusNode,
|
||||
tooltip: isFavourite ? context.l10n.entryActionRemoveFavourite : context.l10n.entryActionAddFavourite,
|
||||
|
@ -88,7 +87,8 @@ class _FavouriteTogglerState extends State<FavouriteToggler> {
|
|||
Sweeper(
|
||||
key: ValueKey(entries.length == 1 ? entries.first : entries.length),
|
||||
builder: (context) => Icon(
|
||||
favouriteSweeperIcon,
|
||||
AIcons.favourite,
|
||||
fill: 0,
|
||||
color: context.select<AvesColorsData, Color>((v) => v.favourite),
|
||||
),
|
||||
toggledNotifier: _isFavouriteNotifier,
|
||||
|
|
|
@ -140,7 +140,7 @@ class _AvesDonutState extends State<AvesDonut> with AutomaticKeepAliveClientMixi
|
|||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(AIcons.disc, color: colorize(context, d)),
|
||||
Icon(AIcons.circle, fill: 1, color: colorize(context, d)),
|
||||
const SizedBox(width: 8),
|
||||
Flexible(
|
||||
child: Text(
|
||||
|
|
|
@ -62,6 +62,7 @@ class _EditEntryRatingDialogState extends State<EditEntryRatingDialog> {
|
|||
children: [
|
||||
...List.generate(5, (i) {
|
||||
final thisRating = i + 1;
|
||||
final disabled = _rating < thisRating;
|
||||
return GestureDetector(
|
||||
onTap: () => setState(() {
|
||||
_action = _RatingAction.set;
|
||||
|
@ -71,8 +72,9 @@ class _EditEntryRatingDialogState extends State<EditEntryRatingDialog> {
|
|||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Icon(
|
||||
_rating < thisRating ? AIcons.rating : AIcons.ratingFull,
|
||||
color: _rating < thisRating ? AColors.starDisabled : AColors.starEnabled,
|
||||
AIcons.rating,
|
||||
fill: disabled ? 0 : 1,
|
||||
color: disabled ? AColors.starDisabled : AColors.starEnabled,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -104,7 +104,7 @@ class _CoverSelectionDialogState extends State<CoverSelectionDialog> {
|
|||
_buildTab(
|
||||
context,
|
||||
const Key('tab-color'),
|
||||
AIcons.opacity,
|
||||
AIcons.palette,
|
||||
l10n.coverDialogTabColor,
|
||||
),
|
||||
Column(children: _buildColorOptions()),
|
||||
|
|
|
@ -91,7 +91,6 @@ class _AppBottomNavBarState extends State<AppBottomNavBar> {
|
|||
.toList(),
|
||||
onTap: (index) => _goTo(context, items, index),
|
||||
currentIndex: _getCurrentIndex(context, items),
|
||||
elevation: 0,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
backgroundColor: backgroundColor,
|
||||
showSelectedLabels: false,
|
||||
|
|
|
@ -56,6 +56,9 @@ class EntryInfoActionDelegate with FeedbackMixin, PermissionAwareMixin, EntryEdi
|
|||
return canWrite && targetEntry.isMotionPhoto;
|
||||
case EntryAction.viewMotionPhotoVideo:
|
||||
return appMode.canNavigate && targetEntry.isMotionPhoto;
|
||||
// debug
|
||||
case EntryAction.debug:
|
||||
return !kReleaseMode;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ class InfoAppBar extends StatelessWidget {
|
|||
const PopupMenuDivider(),
|
||||
...formatSpecificActions.map((action) => _toMenuItem(context, action, enabled: actionDelegate.canApply(entry, action))),
|
||||
],
|
||||
if (!kReleaseMode) ...[
|
||||
if (isVisible(EntryAction.debug)) ...[
|
||||
const PopupMenuDivider(),
|
||||
_toMenuItem(context, EntryAction.debug, enabled: true),
|
||||
]
|
||||
|
|
|
@ -69,7 +69,7 @@ class _TvMetadataPageState extends State<TvMetadataPage> {
|
|||
final dir = metadata[titles[i]]!;
|
||||
final color = MetadataDirTile.getTitleColor(context, dir);
|
||||
return NavigationRailDestination(
|
||||
icon: Icon(AIcons.disc, color: color),
|
||||
icon: Icon(AIcons.circle, fill: 1, color: color),
|
||||
label: Text(title),
|
||||
);
|
||||
}).toList(),
|
||||
|
|
|
@ -250,7 +250,11 @@ class _ViewerButtonRowContentState extends State<ViewerButtonRowContent> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final appMode = context.watch<ValueNotifier<AppMode>>().value;
|
||||
final showOrientationActions = EntryActions.orientationActions.any((v) => actionDelegate.isVisible(appMode: appMode, action: v));
|
||||
bool isVisible(EntryAction action) => actionDelegate.isVisible(
|
||||
appMode: appMode,
|
||||
action: action,
|
||||
);
|
||||
final showOrientationActions = EntryActions.orientationActions.any(isVisible);
|
||||
final topLevelActions = widget.topLevelActions;
|
||||
final exportActions = widget.exportActions;
|
||||
final videoActions = widget.videoActions;
|
||||
|
@ -304,7 +308,7 @@ class _ViewerButtonRowContentState extends State<ViewerButtonRowContent> {
|
|||
...videoActions.map((action) => _buildPopupMenuItem(context, action, videoController)),
|
||||
],
|
||||
),
|
||||
if (!kReleaseMode) ...[
|
||||
if (isVisible(EntryAction.debug)) ...[
|
||||
const PopupMenuDivider(),
|
||||
_buildPopupMenuItem(context, EntryAction.debug, videoController),
|
||||
]
|
||||
|
|
16
pubspec.lock
16
pubspec.lock
|
@ -73,6 +73,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
chalkdart:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: chalkdart
|
||||
sha256: "82dfa884e3cf97641eb0742a3b9ffd41490666b9ece548b2e32cbfefe540bf86"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -787,6 +795,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.7296"
|
||||
material_symbols_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: material_symbols_icons
|
||||
sha256: "99d5b0e7c65232dfe1247e0ac67eeeee2cab9da2d860748fc495d34f5e9e6397"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.2811.0"
|
||||
media_kit:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -97,6 +97,7 @@ dependencies:
|
|||
leak_tracker:
|
||||
local_auth:
|
||||
material_design_icons_flutter:
|
||||
material_symbols_icons:
|
||||
network_info_plus:
|
||||
overlay_support:
|
||||
package_info_plus:
|
||||
|
|
Loading…
Reference in a new issue