Skip to content

Commit

Permalink
[102] Starter code.
Browse files Browse the repository at this point in the history
[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 <penn.zht@gmail.com>

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
  • Loading branch information
willlarche authored and guidezpl committed Apr 23, 2022
1 parent 0f83e60 commit d8268ca
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mdc_100_series/lib/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class HomePage extends StatelessWidget {
body: Center(
child: Text('You did it!'),
),
// TODO: Set resizeToAvoidBottomInset (101)
resizeToAvoidBottomInset: false,
);
}
}
43 changes: 40 additions & 3 deletions mdc_100_series/lib/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class LoginPage extends StatefulWidget {
}

class _LoginPageState extends State<LoginPage> {
// TODO: Add text editing controllers (101)
final _usernameController = TextEditingController();
final _passwordController = TextEditingController();

@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -40,8 +42,43 @@ class _LoginPageState extends State<LoginPage> {
),
const SizedBox(height: 120.0),
// TODO: Remove filled: true values (103)
// TODO: Add TextField widgets (101)
// TODO: Add button bar (101)
TextField(
controller: _usernameController,
decoration: const InputDecoration(
filled: true,
labelText: 'Username',
),
),
const SizedBox(height: 12.0),
TextField(
controller: _passwordController,
decoration: const InputDecoration(
filled: true,
labelText: 'Password',
),
obscureText: true,
),
OverflowBar(
alignment: MainAxisAlignment.end,
children: <Widget>[
// TODO: Add a beveled rectangular border to CANCEL (103)
TextButton(
child: const Text('CANCEL'),
onPressed: () {
_usernameController.clear();
_passwordController.clear();
},
),
// TODO: Add an elevation to NEXT (103)
// TODO: Add a beveled rectangular border to NEXT (103)
ElevatedButton(
child: const Text('NEXT'),
onPressed: () {
Navigator.pop(context);
},
),
],
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion mdc_100_series/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: shrine
description: Learn the basics of using Material Components by building a simple app with core components.
description: Learn how to use Material for structure and layout.

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down

0 comments on commit d8268ca

Please sign in to comment.