Skip to content
Snippets Groups Projects

Resolve "Create styled widgets"

Merged Benoît Harrault requested to merge 67-create-styled-widgets into master
2 files
+ 91
0
Compare changes
  • Side-by-side
  • Inline
Files
2
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:random/ui/widgets/styles_widget.dart';
import 'package:unicons/unicons.dart';
import 'package:random/config/theme.dart';
@@ -29,6 +30,30 @@ class DemoPage extends StatelessWidget {
fakeApiCall(),
const SizedBox(height: 20),
const AppHeader(text: 'BOTTOM'),
const StyledWidget(
child: SizedBox.square(
dimension: 40,
child: Center(child: Text('default')),
),
),
const SizedBox(height: 8),
const StyledWidget(
borderRadius: 0,
borderWidth: 12,
// depth: 8,
lowerColor: Colors.red,
upperColor: Colors.yellow,
child: Center(child: Text('custom 1')),
),
const SizedBox(height: 8),
const StyledWidget(
borderRadius: 10,
borderWidth: 20,
depth: 20,
lowerColor: Colors.blueGrey,
upperColor: Colors.blue,
child: Center(child: Text('custom 2')),
),
],
),
);
Loading