Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for fill (and other font variations) #2

Open
timbell opened this issue Dec 8, 2024 · 2 comments
Open

Support for fill (and other font variations) #2

timbell opened this issue Dec 8, 2024 · 2 comments

Comments

@timbell
Copy link

timbell commented Dec 8, 2024

Any plans to add support for the Icon.fill property?

eg

  child: const IconCraft(
    Icon(Symbols.favorite),
    Icon(Symbols.folder, fill: 1),
    alignment: Alignment.bottomRight,
  ),
@vicenterusso
Copy link
Owner

IconCraft uses Flutter native icon. The fill property should work as intended. Do you have any full example where it doesn't work?

@timbell
Copy link
Author

timbell commented Dec 10, 2024

Here's an example. NB it uses the material_symbols_icons package as the standard Icons don't seem to support the fill parameter.

import 'package:flutter/material.dart';
import 'package:material_symbols_icons/symbols.dart';
import 'package:icon_craft/icon_craft.dart';

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

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            children: [
              Row(
                children: [
                  Text('Normal icon:'),
                  Icon(Symbols.folder),
                ],
              ),
              Row(
                children: [
                  Text('Normal (filled) icon:'),
                  Icon(Symbols.folder, fill: 1),
                ],
              ),
              Row(
                children: [
                  Text('IconCraft icons:'),
                  IconCraft(
                    Icon(Symbols.favorite),
                    Icon(Symbols.folder),
                    alignment: Alignment.bottomRight,
                  ),
                ],
              ),
              Row(
                children: [
                  Text('IconCraft (filled primary) icons:'),
                  IconCraft(
                    Icon(Symbols.favorite, fill: 1),
                    Icon(Symbols.folder),
                    alignment: Alignment.bottomRight,
                  ),
                ],
              ),
              Row(
                children: [
                  Text('IconCraft (filled secondary) icons:'),
                  IconCraft(
                    Icon(Symbols.favorite),
                    Icon(Symbols.folder, fill: 1),
                    alignment: Alignment.bottomRight,
                  ),
                ],
              ),
            ],
          ),
        ),
      ),
    );
  }
}

As I see it, this handling is missing in icon_craft here and here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants