Skip to content

[104] Todos for 104 #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion mdc_100_series/lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,27 @@
// limitations under the License.

import 'package:flutter/material.dart';

// TODO: Import backdrop.dart (104)
import 'colors.dart';
import 'home.dart';
import 'login.dart';
// TODO: Import CategoryMenuPage (104)
import 'supplemental/cut_corners_border.dart';

// TODO: Convert ShrineApp to stateful widget(104)
class ShrineApp extends StatelessWidget {
// TODO: Add variable for selected Category (104)
// TODO: Add a callback when a Category is tapped (104)

@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Shrine',
// TODO: Change home: to a Backdrop with a HomePage frontLayer (104)
home: HomePage(),
// TODO: Pass _currentCategory for frontLayer (104)
// TODO: Change backLayer field value to CategoryMenuPage (104)
// TODO: Make currentCategory field take _currentCategory
initialRoute: '/login',
onGenerateRoute: _getRoute,
theme: _kShrineTheme,
Expand Down
4 changes: 4 additions & 0 deletions mdc_100_series/lib/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ import 'model/product.dart';
import 'supplemental/asymmetric_view.dart';

class HomePage extends StatelessWidget {
// TODO: Add a variable for Category (104)

@override
Widget build(BuildContext context) {
// TODO: Return an AsymmetricView (104)
// TODO: Pass Category variable to AsymmetricView (104)
return Scaffold(
appBar: AppBar(
brightness: Brightness.light,
Expand Down
3 changes: 3 additions & 0 deletions mdc_100_series/lib/supplemental/product_columns.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ class TwoProductCardColumn extends StatelessWidget {

double heightOfCards = (constraints.biggest.height - spacerHeight) / 2.0;
double heightOfImages = heightOfCards - ProductCard.kTextBoxHeight;
// TODO: Change imageAspectRatio calculation (104)
double imageAspectRatio = constraints.biggest.width / heightOfImages;

// TODO: Replace Column with a ListView (104)
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
Expand Down Expand Up @@ -71,6 +73,7 @@ class OneProductCardColumn extends StatelessWidget {

@override
Widget build(BuildContext context) {
// TODO: Replace Column with a ListView (104)
return Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Expand Down