sf_symbols 0.1.0 copy "sf_symbols: ^0.1.0" to clipboard
sf_symbols: ^0.1.0 copied to clipboard

PlatformiOS
outdated

Native SF Symbols on iOS

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:sf_symbols/sf_symbols.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool show = true;
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData.dark(useMaterial3: true),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('SF Symbols'),
        ),
        body: GestureDetector(
          behavior: HitTestBehavior.opaque,
          onTap: () {
            setState(() {
              show = !show;
            });
          },
          child: show
              ? Center(
                  child: SingleChildScrollView(
                    child: Wrap(
                      spacing: 0,
                      runSpacing: 20,
                      children: [
                        for (var name in [
                          'camera',
                          'camera.macro',
                          'camera.aperture',
                          'camera.filters',
                        ])
                          for (var color in [
                            Colors.blueAccent,
                            Colors.pinkAccent,
                            Colors.greenAccent,
                            // Colors.amberAccent
                          ])
                            for (var weight in FontWeight.values)
                              SizedBox(
                                width: 40,
                                child: SfSymbol(
                                  size: 40,
                                  weight: weight,
                                  color: color,
                                  name: name,
                                ),
                              ),
                      ],
                    ),
                  ),
                )
              : null,
        ),
      ),
    );
  }
}
13
likes
140
points
481
downloads
screenshot

Publisher

verified publisherhanshi.tech

Weekly Downloads

Native SF Symbols on iOS

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on sf_symbols