Yet another Tabler Icons package for Flutter that keeps updating with the latest version of the upstream.
https://tabler-icons-next.betakuang.me/
import 'package:tabler_icons_next/tabler_icons_next.dart';
Check()Note:
A dollar sign (
$) prefix is added to icon names not allowed by Dart. Currently onlyFunctionis altered to$Function.
Names of some icons may conflict with other Flutter/Dart classes (for example Container and BorderRadius). Use a package alias to avoid confusion.
import 'package:tabler_icons_next/tabler_icons_next.dart' as tabler;
tabler.Check()import 'package:tabler_icons_next/tabler_icons_next.dart' as tabler;
tabler.Check(
height: 18,
width: 18,
strokeWidth: 1.5,
color: Colors.teal,
)Tabler Icons Next uses flutter_svg to draw icons. Parameters from SvgPicture.string are ported to icon widgets for customization. See docs of SvgPicture.string for the full list of params.
Similar to the built-in Icon and IconTheme, Tabler Icons Next provides a way to customize the theme of icons from outside the widgets.
import 'package:tabler_icons_next/tabler_icons_next.dart' as tabler;
tabler.IconTheme(
data: tabler.IconThemeData(
strokeWidth: 1.5,
color: Colors.teal,
),
child: tabler.Check(),
)This allows you to wrap the icons into your own widgets and customize the styles to your needs. For example:
import 'package:tabler_icons_next/tabler_icons_next.dart' as tabler;
class MyIconButton extends StatelessWidget {
const MyIconButton(
this.icon, {
super.key,
});
// Use tabler.Icon if you need a base class for all icons.
final tabler.Icon icon;
@override
Widget build(BuildContext context) {
return GestureDetector(
// ...
child: tabler.IconTheme(
// Customize the styles of the icon, no matter what icon is passed in.
data: tabler.IconThemeData(
color: Colors.amber,
),
child: icon,
),
);
}
}MIT