From 8ce1ed4dc6c23c2c6694cbf12e9f79642b484845 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Wed, 11 Sep 2019 21:37:55 -0700 Subject: [PATCH] add washingtonstate.dart --- web/attractions.dart | 9 +++++-- web/card_templates.dart | 6 ++++- web/prebuildcards.dart | 50 ++++++++++++++++++++++++++++++++++++ web/washingtonhiking.dart | 41 ++++++++++++++++++++++++++++++ web/washingtonstate.dart | 53 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 156 insertions(+), 3 deletions(-) create mode 100644 web/washingtonhiking.dart create mode 100644 web/washingtonstate.dart diff --git a/web/attractions.dart b/web/attractions.dart index d998acc..b1faabd 100644 --- a/web/attractions.dart +++ b/web/attractions.dart @@ -1,11 +1,11 @@ import 'package:flutter_web/material.dart'; import 'defaults.dart'; -import 'prebuildcards.dart'; import 'card_templates.dart'; import 'washingtonpark.dart'; import 'mounthood.dart'; import 'columbiagorge.dart'; import 'oregoncoast.dart'; +import 'washingtonstate.dart'; import 'eastwillamettevalleysights.dart'; import 'westwillamettevalleysights.dart'; @@ -31,7 +31,6 @@ class _AttractionsState extends State { padding: EdgeInsets.only(bottom: 6.0,), child: Column( children: [ - mountSaintHelens(), InkWell( onTap: () async { await Navigator.push(context, MaterialPageRoute(builder: (context) => WestWillametteValleySights())); @@ -68,6 +67,12 @@ class _AttractionsState extends State { }, child: cardOne('Visit the Zoo, Rose Garden, Hoyt Arboretum, Pittock Mansion, and Japanese Garden at WashingtonPark.'), ), + InkWell( + onTap: () async { + await Navigator.push(context, MaterialPageRoute(builder: (context) => WashingtonState())); + }, + child: cardOne('Sight-See in Washington State.'), + ), ], ), ), diff --git a/web/card_templates.dart b/web/card_templates.dart index bdb30dc..6b5be26 100644 --- a/web/card_templates.dart +++ b/web/card_templates.dart @@ -19,7 +19,11 @@ Card infoCard(String leftText,String infoUrl,String infoUrlName) { child: Row( children: [ Expanded( - flex: 8, + flex: 1, + child: Card(), + ), + Expanded( + flex: 7, child: Text( leftText, style: TextStyle( diff --git a/web/prebuildcards.dart b/web/prebuildcards.dart index 85685be..4ad1717 100644 --- a/web/prebuildcards.dart +++ b/web/prebuildcards.dart @@ -430,3 +430,53 @@ Card tillamookAirMuseum() { 'tillamook-air-museum-map' ); } + +Card olympicNationalPark() { + return convenienceCardOne( + 'https://en.wikipedia.org/wiki/Olympic_National_Park', + 'olympic-national-park', + 'Visit Olympic National Park.', + 'https://www.google.com/maps/@47.6751176,-123.6015532,10z', + 'olympic-national-park-map' + ); +} + +Card mountRanierNationalPark() { + return convenienceCardOne( + 'https://en.wikipedia.org/wiki/Mount_Rainier_National_Park', + 'mount-ranier-national-park', + 'Visit Mt Ranier National Park.', + 'https://www.google.com/maps/@46.9068896,-121.7539242,10z', + 'mount-ranier-national-park-map' + ); +} + +Card hanfordReachNationalMonument() { + return convenienceCardOne( + 'https://www.youtube.com/watch?v=0iyM04F4exs', + 'hanford-reach-national-monument', + 'Hike the White Bluffs above Hanford Reach.', + 'https://www.google.com/maps/@46.6780725,-119.4390818,15z', + 'hanford-reach-national-monument-map' + ); +} + +Card channeledScablands() { + return convenienceCardOne( + 'http://hugefloods.com/Scablands.html', + 'channeled-scablands', + 'Visit the Channeled Scablands', + 'https://www.google.com/maps/@46.975,-119.196389,17z', + 'channeled-scablands-map' + ); +} + +Card grandCouleeDam() { + return convenienceCardOne( + 'https://en.wikipedia.org/wiki/Grand_Coulee_Dam', + 'grand-coulee-dam', + 'Visit the Grand Coulee Dam', + 'https://www.google.com/maps/@47.955833,-118.981667,14z', + 'grand-coulee-dam-map' + ); +} diff --git a/web/washingtonhiking.dart b/web/washingtonhiking.dart new file mode 100644 index 0000000..8b07fd1 --- /dev/null +++ b/web/washingtonhiking.dart @@ -0,0 +1,41 @@ +import 'package:flutter_web/material.dart'; +import 'defaults.dart'; +import 'card_templates.dart'; + +class WashingtonHiking extends StatefulWidget { + @override + _WashingtonHikingState createState() => _WashingtonHikingState(); +} + +class _WashingtonHikingState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('washington-hiking'), + centerTitle: true, + backgroundColor: navy, + actions: [ + IconButton( + icon: Icon(Icons.home), + onPressed: () { + Navigator.of(context).popUntil((route) => route.isFirst); + }, + ), + ], + ), + backgroundColor: peacockBlue, + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.only(bottom: 6.0,), + child: Column( + children: [ + infoCard('Hike at the Washington Coast.','https://www.oregonhikers.org/field_guide/Washington_Coast_Hikes','a'), + infoCard('Hike South West Washington.','https://www.oregonhikers.org/field_guide/Southwest_Washington_Hikes','b'), + ], + ), + ), + ), + ); + } +} diff --git a/web/washingtonstate.dart b/web/washingtonstate.dart new file mode 100644 index 0000000..b31b841 --- /dev/null +++ b/web/washingtonstate.dart @@ -0,0 +1,53 @@ +import 'package:flutter_web/material.dart'; +import 'defaults.dart'; +import 'card_templates.dart'; +import 'prebuildcards.dart'; +import 'washingtonhiking.dart'; + +class WashingtonState extends StatefulWidget { + @override + _WashingtonStateState createState() => _WashingtonStateState(); +} + +class _WashingtonStateState extends State { + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('WashingtonState'), + centerTitle: true, + backgroundColor: navy, + actions: [ + IconButton( + icon: Icon(Icons.home), + onPressed: () { + Navigator.of(context).popUntil((route) => route.isFirst); + }, + ), + ], + ), + backgroundColor: peacockBlue, + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.only(bottom: 6.0,), + child: Column( + children: [ + mountSaintHelens(), + olympicNationalPark(), + mountRanierNationalPark(), + hanfordReachNationalMonument(), + channeledScablands(), + InkWell( + onTap: () async { + await Navigator.push(context, MaterialPageRoute(builder: (context) => WashingtonHiking())); + }, + child: cardOne('Hiking in Washington State.'), + ), + ], + ), + ), + ), + ); + } +}