Skip to content

Commit 0ef1c12

Browse files
willlarcheguidezpl
authored andcommitted
[102] Starter code.
[Docs] Initial commit. [101] Starter code. Add todo for slanted menu asset in 101 (#179) Updates for latest flutter stable (#240) * Recreate android and ios Update to Android embedding v2 Deletes png assets by using Android's adaptive launcher icon system Recreates ios/ Bumps up pubspec versions * Gradle bump update ios icon and name (#244) remove unnecessary import fix formatting fix Android build issues Delete widget_test.dart remove outdated TODOs Update login.dart fix product_card text styles declare routes, rather than using onGenerateRoute and home incorrectly [102] Starter code. Add environment constraint Migrate 101-complete to NNBD (#221) (#232) * Update versions. * Migrate. Co-authored-by: Tianguang <[email protected]> Updates for latest flutter stable (#240) * Recreate android and ios Update to Android embedding v2 Deletes png assets by using Android's adaptive launcher icon system Recreates ios/ Bumps up pubspec versions * Gradle bump Adopting flutter_lints on 102-starter branch (#252) update iOS build fix Android build issues replace ButtonBar with OverflowBar remove outdated TODOs Delete widget_test.dart
1 parent 0f83e60 commit 0ef1c12

File tree

4 files changed

+43
-6
lines changed

4 files changed

+43
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The starter and completed code is in the various branches of this repo.
1212

1313
## Getting Started
1414

15-
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.
15+
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.
1616

1717
## Support
1818

mdc_100_series/lib/home.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HomePage extends StatelessWidget {
2929
body: Center(
3030
child: Text('You did it!'),
3131
),
32-
// TODO: Set resizeToAvoidBottomInset (101)
32+
resizeToAvoidBottomInset: false,
3333
);
3434
}
3535
}

mdc_100_series/lib/login.dart

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ class LoginPage extends StatefulWidget {
2222
}
2323

2424
class _LoginPageState extends State<LoginPage> {
25-
// TODO: Add text editing controllers (101)
25+
final _usernameController = TextEditingController();
26+
final _passwordController = TextEditingController();
27+
2628
@override
2729
Widget build(BuildContext context) {
2830
return Scaffold(
@@ -40,8 +42,43 @@ class _LoginPageState extends State<LoginPage> {
4042
),
4143
const SizedBox(height: 120.0),
4244
// TODO: Remove filled: true values (103)
43-
// TODO: Add TextField widgets (101)
44-
// TODO: Add button bar (101)
45+
TextField(
46+
controller: _usernameController,
47+
decoration: const InputDecoration(
48+
filled: true,
49+
labelText: 'Username',
50+
),
51+
),
52+
const SizedBox(height: 12.0),
53+
TextField(
54+
controller: _passwordController,
55+
decoration: const InputDecoration(
56+
filled: true,
57+
labelText: 'Password',
58+
),
59+
obscureText: true,
60+
),
61+
OverflowBar(
62+
alignment: MainAxisAlignment.end,
63+
children: <Widget>[
64+
// TODO: Add a beveled rectangular border to CANCEL (103)
65+
TextButton(
66+
child: const Text('CANCEL'),
67+
onPressed: () {
68+
_usernameController.clear();
69+
_passwordController.clear();
70+
},
71+
),
72+
// TODO: Add an elevation to NEXT (103)
73+
// TODO: Add a beveled rectangular border to NEXT (103)
74+
ElevatedButton(
75+
child: const Text('NEXT'),
76+
onPressed: () {
77+
Navigator.pop(context);
78+
},
79+
),
80+
],
81+
),
4582
],
4683
),
4784
),

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
environment:
55
sdk: ">=2.12.0 <3.0.0"

0 commit comments

Comments
 (0)