vscode_material_icon_theme 5.26.0
vscode_material_icon_theme: ^5.26.0 copied to clipboard
A Flutter package that ports the popular vscode-material-icon-theme to Flutter
import 'all.g.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(title),
),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: GridView.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 25, // Number of columns in the table
crossAxisSpacing: 8,
mainAxisSpacing: 8,
),
itemCount: allIcons.length,
itemBuilder: (context, index) {
return Card(
elevation: 2,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture(allIcons[index]),
),
);
},
),
),
);
}
}