Added docs for new widgets

This commit is contained in:
Mariano Uvalle 2019-03-31 00:15:55 -06:00
parent 34a9aa6275
commit 50ae7d866a
5 changed files with 10 additions and 3 deletions

View file

@ -11,6 +11,8 @@ class App extends StatelessWidget {
//home: Text('Start'),
onGenerateRoute: routes,
theme: ThemeData(
// Accent color is set to be used by the floating action button.
accentColor: Color(0xFF707070),
canvasColor: Color.fromRGBO(23, 25, 29, 1.0),
cardColor: Color.fromRGBO(36, 39, 44, 1.0),
fontFamily: 'IBM Plex Sans',

View file

View file

@ -1,6 +1,10 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
/// A card with a label and circular button.
///
/// Let's you specify the text shown and the action to perform when the circular
/// button is pressed.
class NewItemDialogButton extends StatelessWidget {
final VoidCallback onTap;
final String label;
@ -35,7 +39,6 @@ class NewItemDialogButton extends StatelessWidget {
),
FloatingActionButton(
child: Icon(FontAwesomeIcons.plus),
backgroundColor: Color(0xFF707070),
onPressed: () {},
),
],

View file

@ -3,6 +3,8 @@ import 'package:flutter/cupertino.dart';
import './new-item-dialog-button.dart';
/// A transparent screen that lets you choose between creating a new task or
/// add a new picture.
class NewItemDialogRoute extends PopupRoute {
@override
// TODO: implement barrierColor
@ -19,8 +21,7 @@ class NewItemDialogRoute extends PopupRoute {
@override
Widget buildPage(BuildContext context, Animation<double> animation,
Animation<double> secondaryAnimation) {
final result = _builder(context);
return result;
return _builder(context);
}
Widget _builder(BuildContext context) {

View file

@ -3,6 +3,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import './gradient_touchable_container.dart';
//TODO: Add neccessary properties to be able to inform of changes in text field.
class SearchBox extends StatelessWidget {
final double height;