design 0.0.9 design: ^0.0.9 copied to clipboard
Flutter App Design System
import 'package:design/design.dart';
import 'package:example/colors_page.dart';
import 'package:example/typography_page.dart';
import 'package:example/widgets_page.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: AppTheme.standard,
home: DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
title: const Text('Design System Example'),
bottom: const TabBar(
tabs: [
Tab(
text: 'Widgets',
icon: Icon(Icons.widgets),
),
Tab(
text: 'Typography',
icon: Icon(Icons.text_fields),
),
Tab(
text: 'Colors',
icon: Icon(Icons.palette),
),
],
),
),
body: Padding(
padding: const EdgeInsets.all(16),
child: TabBarView(
children: [
const WidgetsPage(),
const TypographyPage(),
ColorsPage(colors: AppColors.colors.entries.toList()),
],
),
),
),
),
);
}
}