Skip to content

Commit 65eb3b1

Browse files
willlarchemichdud
authored andcommitted
[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] 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] 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] 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 (#59) [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) [102] Completed code. [101] Starter code. [103] Supplemental files. [101] Correcting supplemental files. [101] Minor renaming. [101] Missing dependency. [101] Dart 2. [101] Dart 2. [101] Complete code. [102] Starter code. [102] Minor copy correction. [101] Update for Dart 2 [102] Rebase. [102] starter todos (#54) [101] Remove 104 comments.
1 parent 6af0234 commit 65eb3b1

File tree

4 files changed

+51
-16
lines changed

4 files changed

+51
-16
lines changed

README.md

+1-1
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

+2
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

+47-14
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,65 @@ import 'package:flutter/material.dart';
1616

1717
class LoginPage extends StatefulWidget {
1818
@override
19-
_LoginPageState createState() => new _LoginPageState();
19+
_LoginPageState createState() => _LoginPageState();
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) {
26-
return new Scaffold(
27-
body: new SafeArea(
28-
child: new ListView(
29-
padding: const EdgeInsets.symmetric(horizontal: 24.0),
28+
return Scaffold(
29+
body: SafeArea(
30+
child: ListView(
31+
padding: EdgeInsets.symmetric(horizontal: 24.0),
3032
children: <Widget>[
31-
const SizedBox(height: 80.0),
32-
new Column(
33+
SizedBox(height: 80.0),
34+
Column(
3335
children: <Widget>[
34-
new Image.asset('assets/diamond.png'),
35-
const SizedBox(height: 16.0),
36-
const Text('SHRINE'),
36+
Image.asset('assets/diamond.png'),
37+
SizedBox(height: 16.0),
38+
Text('SHRINE'),
3739
],
3840
),
39-
const SizedBox(height: 120.0),
41+
SizedBox(height: 120.0),
4042
// TODO: Wrap Username with PrimaryColorOverride (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 PrimaryColorOverride (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+
FlatButton(
64+
child: Text('CANCEL'),
65+
onPressed: () {
66+
_usernameController.clear();
67+
_passwordController.clear();
68+
},
69+
),
70+
RaisedButton(
71+
child: Text('NEXT'),
72+
onPressed: () {
73+
Navigator.pop(context);
74+
},
75+
),
76+
],
77+
),
4578
],
4679
),
4780
),

mdc_100_series/pubspec.yaml

+1-1
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)