Skip to main content

hm_symbol 1.1.0 copy "hm_symbol: ^1.1.0" to clipboard
hm_symbol: ^1.1.0 copied to clipboard

HarmonyOS Symbol icon library for Flutter. 3,844 variable font icons with runtime search support.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'home_page.dart';

void main() => runApp(const SymbolGalleryApp());

/// HarmonyOS brand blue, used as the seed color of the gallery theme.
const _seedColor = Color(0xFF007DFF);

/// The gallery application: a searchable showcase of every HarmonyOS Symbol.
///
/// It runs on mobile, desktop and web. See `web/` for the web specific bits.
class SymbolGalleryApp extends StatefulWidget {
  const SymbolGalleryApp({super.key});

  @override
  State<SymbolGalleryApp> createState() => _SymbolGalleryAppState();
}

class _SymbolGalleryAppState extends State<SymbolGalleryApp> {
  ThemeMode _themeMode = ThemeMode.system;

  void _cycleThemeMode() {
    setState(() {
      _themeMode = switch (_themeMode) {
        ThemeMode.system => ThemeMode.light,
        ThemeMode.light => ThemeMode.dark,
        ThemeMode.dark => ThemeMode.system,
      };
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'HarmonyOS Symbol',
      debugShowCheckedModeBanner: false,
      theme: _buildTheme(Brightness.light),
      darkTheme: _buildTheme(Brightness.dark),
      themeMode: _themeMode,
      home: HomePage(themeMode: _themeMode, onCycleThemeMode: _cycleThemeMode),
    );
  }
}

ThemeData _buildTheme(Brightness brightness) {
  final colorScheme = ColorScheme.fromSeed(
    seedColor: _seedColor,
    brightness: brightness,
  );
  return ThemeData(
    useMaterial3: true,
    colorScheme: colorScheme,
    snackBarTheme: SnackBarThemeData(
      behavior: SnackBarBehavior.floating,
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
    ),
  );
}
1
likes
160
points
128
downloads
screenshot

Documentation

Documentation
API reference

Publisher

verified publishernoob-coder.com

Weekly Downloads

HarmonyOS Symbol icon library for Flutter. 3,844 variable font icons with runtime search support.

Homepage
Repository (GitHub)
View/report issues

Topics

#assets #icons #huawei #harmony-os #symbol

License

MIT (license)

Dependencies

flutter

More

Packages that depend on hm_symbol