Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:sca/app/shared/layout/layout.dart';
- import 'package:sca/app/shared/widgets/avatar.dart';
- class ColorBasePage extends StatefulWidget {
- final String title;
- const ColorBasePage({Key key, this.title}) : super(key: key);
- @override
- _ColorBasePageState createState() => _ColorBasePageState();
- }
- class _ColorBasePageState extends State<ColorBasePage> {
- Widget content(BuildContext context) => Center(
- child: SingleChildScrollView(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- SizedBox(height: 10),
- Text(
- 'Página padrão',
- style: Theme.of(context).textTheme.title,
- ),
- Text(
- 'Teste de estilos',
- style: TextStyle(
- color: Layout.info(),
- fontWeight: FontWeight.bold,
- fontSize: 16,
- ),
- ),
- SizedBox(height: 30),
- Text(
- 'Headline',
- style: Theme.of(context).textTheme.headline,
- ),
- Text(
- 'Title',
- style: Theme.of(context).textTheme.title,
- ),
- Text(
- 'Body 1',
- style: Theme.of(context).textTheme.body1,
- ),
- Text('Texto padrão'),
- Text('Light color', style: TextStyle(color: Layout.light())),
- Text('Medium color', style: TextStyle(color: Layout.medium())),
- Text('Dark color', style: TextStyle(color: Layout.dark())),
- Text('Danger color', style: TextStyle(color: Layout.danger())),
- Text('Success color', style: TextStyle(color: Layout.success())),
- Text('Info color', style: TextStyle(color: Layout.info())),
- Text('Warning color', style: TextStyle(color: Layout.warning())),
- SizedBox(height: 10),
- Avatar(
- name: "Beatriz Vitória",
- image: "assets/tmp/usuario.jpg",
- borderTickness: 1,
- borderColor: Layout.light(),
- ),
- SizedBox(height: 20),
- ],
- ),
- ),
- );
- @override
- Widget build(BuildContext context) {
- return Layout.render(
- title: widget.title,
- content: content(context),
- floatingActionButton: FloatingActionButton(
- onPressed: () {},
- tooltip: 'TODO: Automatizar Floating', // TODO: Automatizar Floating
- child: Icon(Icons.add),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment