Skip to content

Commit f6cea0b

Browse files
committed
[101] Completed code.
[101] Making AppBar something you add in 102. [Model] Adding model from the start. [103] Adding fonts. [103] Supplemental files. [101] Correcting supplemental files. [101] Copy correction. [101] Minor renaming. [101] Update for Dart 2. [101] Missing dependency. [101] Dart 2. [101] Dart 2. [101] Dart 2. [101] Dart 2. [101] Correcting model. [Meta] README file. [Meta] Clarification. [101] Copy correction. [104] Updating data. [101] Correcting widget class. (#23) Add link to actual codelab in the README [Meta] README correction. [101] README specificity. Add the slanted_menu.png to assets for 101 branch so its ready when needed. (#44) [101] TODOs for starter code (#50) [101] Added future TODOs to 101 starter [101] Included lines to ignore .iml files and files in idea/ (#67) [101] Remove 104 comments [All] Icons for Android and iOS. (#69) [101] Add .vscode/ to gitignore, stop tracking ignored files (#71) Removes files that should not be tracked because they've been ignored by gitignore rules (but have yet to be removed from the repository itself). Also adds the .vscode folder to gitignore, for users who might use VSCode as their development environment. [101] Removed legacy 'new' and 'const' from 101 starter codelab (#72) [101] Restore legacy to data.dart and product.dart (#75) [101] Update import for app.dart to stop type errors in future codelabs (#83) Replace data.dart (#99) [All] Adding back in filter functionality. (#112) [106] Update TODO from "PrimaryColorOverride" to "AccentColorOverride" (#115) * [106] Update TODO from "PrimaryColorOverride" to "AccentColorOverride" * [106] Update TODO from "PrimaryColorOverride" to "AccentColorOverride" [101] Completed code. [103] Correcting cut corners file. [102] Updating pubspec. [101] Completed code.
1 parent 3486e1b commit f6cea0b

File tree

4 files changed

+43
-5
lines changed

4 files changed

+43
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Codelabs MDC-101 through MDC-104 will guide you through building and integrating
1111
The starter and completed code is in the various branches of this repo.
1212

1313
## Getting Started
14-
Visit the [Google codelabs site](https://codelabs.developers.google.com/), or [codelabs.developers.google.com/codelabs/mdc-101-flutter](https://codelabs.developers.google.com/codelabs/mdc-101-flutter), to follow along the guided steps.
14+
Visit the [Google codelabs site](https://codelabs.developers.google.com/), or [codelabs.developers.google.com/codelabs/mdc-102-flutter](https://codelabs.developers.google.com/codelabs/mdc-102-flutter), to follow along the guided steps.
1515

1616
## Support
1717

mdc_100_series/lib/home.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import 'package:flutter/material.dart';
1717
class HomePage extends StatelessWidget {
1818
// TODO: Make a collection of cards (102)
1919
// TODO: Add a variable for Category (104)
20+
2021
@override
2122
Widget build(BuildContext context) {
2223
// TODO: Return an AsymmetricView (104)
@@ -30,3 +31,4 @@ class HomePage extends StatelessWidget {
3031
);
3132
}
3233
}
34+

mdc_100_series/lib/login.dart

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ class LoginPage extends StatefulWidget {
2020
}
2121

2222
class _LoginPageState extends State<LoginPage> {
23-
// TODO: Add text editing controllers (101)
23+
final _usernameController = TextEditingController();
24+
final _passwordController = TextEditingController();
25+
2426
@override
2527
Widget build(BuildContext context) {
2628
return Scaffold(
@@ -39,9 +41,43 @@ class _LoginPageState extends State<LoginPage> {
3941
SizedBox(height: 120.0),
4042
// TODO: Wrap Username with AccentColorOverride (103)
4143
// TODO: Remove filled: true values (103)
44+
TextField(
45+
controller: _usernameController,
46+
decoration: InputDecoration(
47+
filled: true,
48+
labelText: 'Username',
49+
),
50+
),
51+
SizedBox(height: 12.0),
4252
// TODO: Wrap Password with AccentColorOverride (103)
43-
// TODO: Add TextField widgets (101)
44-
// TODO: Add button bar (101)
53+
TextField(
54+
controller: _passwordController,
55+
decoration: InputDecoration(
56+
filled: true,
57+
labelText: 'Password',
58+
),
59+
obscureText: true,
60+
),
61+
ButtonBar(
62+
children: <Widget>[
63+
// TODO: Add a beveled rectangular border to CANCEL (103)
64+
FlatButton(
65+
child: Text('CANCEL'),
66+
onPressed: () {
67+
_usernameController.clear();
68+
_passwordController.clear();
69+
},
70+
),
71+
// TODO: Add an elevation to NEXT (103)
72+
// TODO: Add a beveled rectangular border to NEXT (103)
73+
RaisedButton(
74+
child: Text('NEXT'),
75+
onPressed: () {
76+
Navigator.pop(context);
77+
},
78+
),
79+
],
80+
),
4581
],
4682
),
4783
),

mdc_100_series/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Shrine
2-
description: Learn the basics of using Material Components by building a simple app with core components.
2+
description: Learn how to use Material for structure and layout.
33

44
dependencies:
55
flutter:

0 commit comments

Comments
 (0)