mirror of
https://github.com/localsend/localsend.git
synced 2026-08-07 07:14:52 +00:00
feat: update icons
This commit is contained in:
@@ -5,279 +5,269 @@ import 'package:crypto/crypto.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// The icon alphabet used to visualize fingerprints.
|
||||
/// Icons are picked to have distinct silhouettes and an obvious name,
|
||||
/// so two fingerprints can be compared out loud and at a glance.
|
||||
const iconAlphabet = <IconData>[
|
||||
Icons.ac_unit,
|
||||
Icons.access_alarm,
|
||||
Icons.access_time,
|
||||
Icons.accessibility,
|
||||
Icons.accessibility_new,
|
||||
Icons.account_balance,
|
||||
Icons.account_balance_wallet,
|
||||
Icons.account_box,
|
||||
Icons.account_circle,
|
||||
Icons.adb,
|
||||
Icons.add,
|
||||
Icons.add_a_photo,
|
||||
Icons.add_alarm,
|
||||
Icons.add_alert,
|
||||
Icons.add_box,
|
||||
Icons.add_circle,
|
||||
Icons.add_circle_outline,
|
||||
Icons.add_comment,
|
||||
Icons.add_location,
|
||||
Icons.add_photo_alternate,
|
||||
Icons.add_shopping_cart,
|
||||
Icons.agriculture,
|
||||
Icons.alarm,
|
||||
Icons.alarm_add,
|
||||
Icons.alarm_off,
|
||||
Icons.alarm_on,
|
||||
Icons.album,
|
||||
Icons.all_inbox,
|
||||
Icons.all_inclusive,
|
||||
Icons.analytics,
|
||||
Icons.anchor,
|
||||
Icons.android,
|
||||
Icons.announcement,
|
||||
Icons.api,
|
||||
Icons.app_blocking,
|
||||
Icons.app_registration,
|
||||
Icons.app_settings_alt,
|
||||
Icons.apartment,
|
||||
Icons.apple,
|
||||
Icons.apps,
|
||||
Icons.archive,
|
||||
Icons.arrow_back,
|
||||
Icons.arrow_back_ios,
|
||||
Icons.arrow_downward,
|
||||
Icons.arrow_drop_down,
|
||||
Icons.arrow_drop_up,
|
||||
Icons.arrow_forward,
|
||||
Icons.arrow_forward_ios,
|
||||
Icons.arrow_left,
|
||||
Icons.arrow_right,
|
||||
Icons.arrow_upward,
|
||||
Icons.article,
|
||||
Icons.aspect_ratio,
|
||||
Icons.assessment,
|
||||
Icons.assignment,
|
||||
Icons.assignment_ind,
|
||||
Icons.assignment_late,
|
||||
Icons.assignment_return,
|
||||
Icons.assignment_turned_in,
|
||||
Icons.assistant,
|
||||
Icons.attach_email,
|
||||
Icons.architecture,
|
||||
Icons.attach_file,
|
||||
Icons.attach_money,
|
||||
Icons.attachment,
|
||||
Icons.attribution,
|
||||
Icons.audiotrack,
|
||||
Icons.auto_awesome,
|
||||
Icons.auto_delete,
|
||||
Icons.auto_fix_high,
|
||||
Icons.autorenew,
|
||||
Icons.backspace,
|
||||
Icons.backup,
|
||||
Icons.back_hand,
|
||||
Icons.backpack,
|
||||
Icons.badge,
|
||||
Icons.bar_chart,
|
||||
Icons.batch_prediction,
|
||||
Icons.battery_charging_full,
|
||||
Icons.bakery_dining,
|
||||
Icons.balance,
|
||||
Icons.bathtub,
|
||||
Icons.battery_full,
|
||||
Icons.battery_std,
|
||||
Icons.beach_access,
|
||||
Icons.beenhere,
|
||||
Icons.block,
|
||||
Icons.bento,
|
||||
Icons.biotech,
|
||||
Icons.blender,
|
||||
Icons.bluetooth,
|
||||
Icons.bluetooth_connected,
|
||||
Icons.bluetooth_disabled,
|
||||
Icons.bluetooth_searching,
|
||||
Icons.book,
|
||||
Icons.bolt,
|
||||
Icons.bookmark,
|
||||
Icons.bookmark_border,
|
||||
Icons.bookmarks,
|
||||
Icons.border_all,
|
||||
Icons.border_color,
|
||||
Icons.brush,
|
||||
Icons.bug_report,
|
||||
Icons.build,
|
||||
Icons.business,
|
||||
Icons.business_center,
|
||||
Icons.cable,
|
||||
Icons.cake,
|
||||
Icons.calculate,
|
||||
Icons.calendar_today,
|
||||
Icons.call,
|
||||
Icons.call_end,
|
||||
Icons.call_made,
|
||||
Icons.call_merge,
|
||||
Icons.call_missed,
|
||||
Icons.call_received,
|
||||
Icons.call_split,
|
||||
Icons.camera,
|
||||
Icons.camera_alt,
|
||||
Icons.camera_enhance,
|
||||
Icons.camera_front,
|
||||
Icons.camera_rear,
|
||||
Icons.cancel,
|
||||
Icons.card_giftcard,
|
||||
Icons.card_membership,
|
||||
Icons.card_travel,
|
||||
Icons.category,
|
||||
Icons.campaign,
|
||||
Icons.casino,
|
||||
Icons.cast,
|
||||
Icons.castle,
|
||||
Icons.celebration,
|
||||
Icons.cell_tower,
|
||||
Icons.chair,
|
||||
Icons.change_history,
|
||||
Icons.chat,
|
||||
Icons.chat_bubble,
|
||||
Icons.chat_bubble_outline,
|
||||
Icons.check,
|
||||
Icons.check_box,
|
||||
Icons.check_box_outline_blank,
|
||||
Icons.check_circle,
|
||||
Icons.check_circle_outline,
|
||||
Icons.chevron_left,
|
||||
Icons.chevron_right,
|
||||
Icons.clear,
|
||||
Icons.close,
|
||||
Icons.checkroom,
|
||||
Icons.church,
|
||||
Icons.circle,
|
||||
Icons.cloud,
|
||||
Icons.cloud_circle,
|
||||
Icons.cloud_download,
|
||||
Icons.cloud_off,
|
||||
Icons.cloud_queue,
|
||||
Icons.cloud_upload,
|
||||
Icons.code,
|
||||
Icons.comment,
|
||||
Icons.coffee_maker,
|
||||
Icons.colorize,
|
||||
Icons.computer,
|
||||
Icons.contact_mail,
|
||||
Icons.contact_phone,
|
||||
Icons.contact_support,
|
||||
Icons.contacts,
|
||||
Icons.content_copy,
|
||||
Icons.confirmation_number,
|
||||
Icons.content_cut,
|
||||
Icons.content_paste,
|
||||
Icons.conveyor_belt,
|
||||
Icons.cookie,
|
||||
Icons.coronavirus,
|
||||
Icons.cottage,
|
||||
Icons.credit_card,
|
||||
Icons.crop,
|
||||
Icons.dashboard,
|
||||
Icons.data_usage,
|
||||
Icons.cruelty_free,
|
||||
Icons.cyclone,
|
||||
Icons.delete,
|
||||
Icons.delete_forever,
|
||||
Icons.delete_outline,
|
||||
Icons.description,
|
||||
Icons.desktop_mac,
|
||||
Icons.desktop_windows,
|
||||
Icons.details,
|
||||
Icons.developer_board,
|
||||
Icons.developer_mode,
|
||||
Icons.device_hub,
|
||||
Icons.devices,
|
||||
Icons.dialpad,
|
||||
Icons.directions,
|
||||
Icons.diamond,
|
||||
Icons.directions_bike,
|
||||
Icons.directions_boat,
|
||||
Icons.directions_bus,
|
||||
Icons.directions_car,
|
||||
Icons.directions_run,
|
||||
Icons.directions_walk,
|
||||
Icons.disc_full,
|
||||
Icons.dns,
|
||||
Icons.done,
|
||||
Icons.done_all,
|
||||
Icons.done_outline,
|
||||
Icons.drafts,
|
||||
Icons.door_front_door,
|
||||
Icons.earbuds,
|
||||
Icons.eco,
|
||||
Icons.edit,
|
||||
Icons.edit_location,
|
||||
Icons.egg,
|
||||
Icons.elevator,
|
||||
Icons.email,
|
||||
Icons.error,
|
||||
Icons.error_outline,
|
||||
Icons.event,
|
||||
Icons.event_available,
|
||||
Icons.event_busy,
|
||||
Icons.event_note,
|
||||
Icons.event_seat,
|
||||
Icons.exit_to_app,
|
||||
Icons.expand_less,
|
||||
Icons.expand_more,
|
||||
Icons.explicit,
|
||||
Icons.emoji_events,
|
||||
Icons.emoji_nature,
|
||||
Icons.engineering,
|
||||
Icons.explore,
|
||||
Icons.extension,
|
||||
Icons.face,
|
||||
Icons.facebook,
|
||||
Icons.fast_forward,
|
||||
Icons.fast_rewind,
|
||||
Icons.factory,
|
||||
Icons.fastfood,
|
||||
Icons.favorite,
|
||||
Icons.favorite_border,
|
||||
Icons.featured_play_list,
|
||||
Icons.featured_video,
|
||||
Icons.feedback,
|
||||
Icons.file_download,
|
||||
Icons.file_upload,
|
||||
Icons.filter,
|
||||
Icons.filter_alt,
|
||||
Icons.filter_list,
|
||||
Icons.find_in_page,
|
||||
Icons.fence,
|
||||
Icons.festival,
|
||||
Icons.fingerprint,
|
||||
Icons.fire_extinguisher,
|
||||
Icons.fireplace,
|
||||
Icons.fitness_center,
|
||||
Icons.flag,
|
||||
Icons.flash_auto,
|
||||
Icons.flash_off,
|
||||
Icons.flash_on,
|
||||
Icons.flashlight_on,
|
||||
Icons.flight,
|
||||
Icons.flight_land,
|
||||
Icons.flight_takeoff,
|
||||
Icons.folder,
|
||||
Icons.folder_open,
|
||||
Icons.folder_shared,
|
||||
Icons.forum,
|
||||
Icons.forward,
|
||||
Icons.fullscreen,
|
||||
Icons.fullscreen_exit,
|
||||
Icons.games,
|
||||
Icons.flutter_dash,
|
||||
Icons.forklift,
|
||||
Icons.format_paint,
|
||||
Icons.gavel,
|
||||
Icons.gesture,
|
||||
Icons.get_app,
|
||||
Icons.gif,
|
||||
Icons.grade,
|
||||
Icons.group,
|
||||
Icons.group_add,
|
||||
Icons.group_work,
|
||||
Icons.hd,
|
||||
Icons.headset,
|
||||
Icons.headset_mic,
|
||||
Icons.grass,
|
||||
Icons.groups,
|
||||
Icons.handshake,
|
||||
Icons.hardware,
|
||||
Icons.headphones,
|
||||
Icons.healing,
|
||||
Icons.hearing,
|
||||
Icons.help,
|
||||
Icons.help_outline,
|
||||
Icons.history,
|
||||
Icons.hexagon,
|
||||
Icons.history_edu,
|
||||
Icons.hive,
|
||||
Icons.home,
|
||||
Icons.hotel,
|
||||
Icons.hourglass_empty,
|
||||
Icons.hourglass_full,
|
||||
Icons.http,
|
||||
Icons.https,
|
||||
Icons.image,
|
||||
Icons.image_aspect_ratio,
|
||||
Icons.import_contacts,
|
||||
Icons.import_export,
|
||||
Icons.inbox,
|
||||
Icons.info,
|
||||
Icons.info_outline,
|
||||
Icons.input,
|
||||
Icons.houseboat,
|
||||
Icons.hub,
|
||||
Icons.ice_skating,
|
||||
Icons.icecream,
|
||||
Icons.inventory_2,
|
||||
Icons.iron,
|
||||
Icons.kebab_dining,
|
||||
Icons.key,
|
||||
Icons.keyboard,
|
||||
Icons.label,
|
||||
Icons.king_bed,
|
||||
Icons.kitchen,
|
||||
Icons.landscape,
|
||||
Icons.language,
|
||||
Icons.laptop,
|
||||
Icons.launch,
|
||||
Icons.layers,
|
||||
Icons.light,
|
||||
Icons.lightbulb,
|
||||
Icons.link,
|
||||
Icons.list,
|
||||
Icons.local_activity,
|
||||
Icons.local_airport,
|
||||
Icons.local_atm,
|
||||
Icons.liquor,
|
||||
Icons.local_bar,
|
||||
Icons.local_cafe,
|
||||
Icons.local_dining,
|
||||
Icons.local_grocery_store,
|
||||
Icons.local_hospital,
|
||||
Icons.local_hotel,
|
||||
Icons.local_offer,
|
||||
Icons.local_phone,
|
||||
Icons.local_drink,
|
||||
Icons.local_florist,
|
||||
Icons.local_gas_station,
|
||||
Icons.local_laundry_service,
|
||||
Icons.local_mall,
|
||||
Icons.local_pizza,
|
||||
Icons.local_post_office,
|
||||
Icons.local_see,
|
||||
Icons.local_shipping,
|
||||
Icons.local_taxi,
|
||||
Icons.location_city,
|
||||
Icons.lock,
|
||||
Icons.lock_open,
|
||||
Icons.luggage,
|
||||
Icons.map,
|
||||
Icons.markunread_mailbox,
|
||||
Icons.masks,
|
||||
Icons.medication,
|
||||
Icons.memory,
|
||||
Icons.menu,
|
||||
Icons.menu_book,
|
||||
Icons.mic,
|
||||
Icons.microwave,
|
||||
Icons.military_tech,
|
||||
Icons.monitor_heart,
|
||||
Icons.mood,
|
||||
Icons.mosque,
|
||||
Icons.motorcycle,
|
||||
Icons.mouse,
|
||||
Icons.movie,
|
||||
Icons.museum,
|
||||
Icons.newspaper,
|
||||
Icons.nightlight,
|
||||
Icons.notifications,
|
||||
Icons.oil_barrel,
|
||||
Icons.outdoor_grill,
|
||||
Icons.outlet,
|
||||
Icons.palette,
|
||||
Icons.park,
|
||||
Icons.pentagon,
|
||||
Icons.person,
|
||||
Icons.pets,
|
||||
Icons.phishing,
|
||||
Icons.phone,
|
||||
Icons.photo_camera,
|
||||
Icons.piano,
|
||||
Icons.pie_chart,
|
||||
Icons.place,
|
||||
Icons.pool,
|
||||
Icons.power,
|
||||
Icons.precision_manufacturing,
|
||||
Icons.print,
|
||||
Icons.propane_tank,
|
||||
Icons.psychology,
|
||||
Icons.public,
|
||||
Icons.push_pin,
|
||||
Icons.qr_code,
|
||||
Icons.radar,
|
||||
Icons.radio,
|
||||
Icons.ramen_dining,
|
||||
Icons.receipt,
|
||||
Icons.recycling,
|
||||
Icons.redeem,
|
||||
Icons.refresh,
|
||||
Icons.restaurant,
|
||||
Icons.rocket,
|
||||
Icons.room_service,
|
||||
Icons.route,
|
||||
Icons.router,
|
||||
Icons.sailing,
|
||||
Icons.satellite_alt,
|
||||
Icons.savings,
|
||||
Icons.school,
|
||||
Icons.science,
|
||||
Icons.search,
|
||||
Icons.settings,
|
||||
Icons.shelves,
|
||||
Icons.shield,
|
||||
Icons.shopping_basket,
|
||||
Icons.shopping_cart,
|
||||
Icons.shower,
|
||||
Icons.signpost,
|
||||
Icons.sim_card,
|
||||
Icons.smart_toy,
|
||||
Icons.smartphone,
|
||||
Icons.smoking_rooms,
|
||||
Icons.soap,
|
||||
Icons.solar_power,
|
||||
Icons.speaker,
|
||||
Icons.sports_esports,
|
||||
Icons.sports_football,
|
||||
Icons.sports_golf,
|
||||
Icons.sports_hockey,
|
||||
Icons.sports_motorsports,
|
||||
Icons.sports_soccer,
|
||||
Icons.sports_tennis,
|
||||
Icons.square,
|
||||
Icons.stadium,
|
||||
Icons.stairs,
|
||||
Icons.star,
|
||||
Icons.store,
|
||||
Icons.straighten,
|
||||
Icons.stroller,
|
||||
Icons.table_restaurant,
|
||||
Icons.tag,
|
||||
Icons.temple_buddhist,
|
||||
Icons.theater_comedy,
|
||||
Icons.theaters,
|
||||
Icons.thermostat,
|
||||
Icons.thumb_up,
|
||||
Icons.toggle_on,
|
||||
Icons.toll,
|
||||
Icons.tornado,
|
||||
Icons.toys,
|
||||
Icons.traffic,
|
||||
Icons.train,
|
||||
Icons.tune,
|
||||
Icons.umbrella,
|
||||
Icons.usb,
|
||||
Icons.vaccines,
|
||||
Icons.videocam,
|
||||
Icons.view_in_ar,
|
||||
Icons.visibility,
|
||||
Icons.voicemail,
|
||||
Icons.volcano,
|
||||
Icons.wallet,
|
||||
Icons.warehouse,
|
||||
Icons.warning,
|
||||
Icons.watch,
|
||||
Icons.water_drop,
|
||||
Icons.waves,
|
||||
Icons.wb_sunny,
|
||||
Icons.weekend,
|
||||
Icons.whatshot,
|
||||
Icons.wifi,
|
||||
Icons.wind_power,
|
||||
Icons.window,
|
||||
Icons.wine_bar,
|
||||
Icons.work,
|
||||
];
|
||||
|
||||
/// Hashes the [combined] fingerprints and renders the first 128 bits as 16 icons of [iconAlphabet].
|
||||
|
||||
@@ -5,8 +5,14 @@ import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('iconAlphabet', () {
|
||||
test('every icon is unique', () {
|
||||
expect(iconAlphabet.toSet().length, iconAlphabet.length);
|
||||
test('no two icons share a glyph', () {
|
||||
// Different names can point to the same glyph (e.g. Icons.local_dining and Icons.local_restaurant).
|
||||
final byCodePoint = <int, int>{};
|
||||
for (final icon in iconAlphabet) {
|
||||
byCodePoint.update(icon.codePoint, (count) => count + 1, ifAbsent: () => 1);
|
||||
}
|
||||
final duplicates = byCodePoint.entries.where((e) => e.value > 1).map((e) => '0x${e.key.toRadixString(16)}').toList();
|
||||
expect(duplicates, isEmpty, reason: 'duplicate glyphs: ${duplicates.join(', ')}');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user