Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:solution_02_category_widget/category.dart';
- const _categoryName = 'Cake';
- const _categoryIcon = Icons.cake;
- const _categoryColor = Colors.green;
- void main() {
- runApp(UnitConverterApp());
- }
- class UnitConverterApp extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- debugShowCheckedModeBanner: false,
- title: 'Unit Converter',
- home: Scaffold(
- backgroundColor: Colors.green[100],
- body: Center(
- child: Category(
- name: _categoryName,
- color: _categoryColor,
- iconLocation: _categoryIcon,
- ),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement