Skip to content

Commit

Permalink
Merge pull request #41 from Open-Source-Agriculture/scrollUI
Browse files Browse the repository at this point in the history
Scroll UI2
  • Loading branch information
KipCrossing authored Mar 12, 2021
2 parents c7568df + b4e0748 commit 7521a8c
Show file tree
Hide file tree
Showing 12 changed files with 576 additions and 542 deletions.
238 changes: 104 additions & 134 deletions lib/screens/GC_result.dart

Large diffs are not rendered by default.

87 changes: 46 additions & 41 deletions lib/screens/credits.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:soil_mate/screens/side_bar/drawer.dart';
import '../widgets/credits_links_tile.dart';
import 'package:url_launcher/url_launcher.dart';


class Credits extends StatefulWidget{
Expand All @@ -15,7 +14,7 @@ class _CreditsState extends State<Credits> {
@override
Widget build(BuildContext context) {
return Scaffold(
drawer: SizedBox(width: displayWidth(context)*0.66, child: Drawer(child: CustomDraw(),)),
drawer: SizedBox(width: displayWidth(context)*0.7, child: Drawer(child: CustomDraw(),)),
backgroundColor: Colors.white,
appBar: AppBar(
title: Text(
Expand All @@ -25,51 +24,57 @@ class _CreditsState extends State<Credits> {
backgroundColor: Colors.white,
elevation: 2.0,
),
body: Padding(
padding: const EdgeInsets.all(17.0),
child: Container(
height: displayHeight(context),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
'Thank you for using Soil Mate!',
style: headingTextStyle(context),
),
Text('To keep the development of the app free and open-source, please consider supporting us.',
style: bodyTextStyle(context),
),
LinksTile(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: (displayWidth(context)*0.5),
child: Text(
'This app was developed by Open Source Agriculture. We are siblings who are passionate about agriculture and open-source.',
style: bodyTextStyle(context),
),
body: CustomScrollView(
shrinkWrap: false,
slivers: <Widget>[
SliverPadding(
padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 30),
sliver: SliverList(
delegate: SliverChildListDelegate(
<Widget>[
Text(
'Thank you for using Soil LogR!',
style: headingTextStyle(context),
),
SizedBox(height: displayHeight(context) * 0.05,),
Text('To keep the development of the app free and open-source, please consider supporting us.',
style: bodyTextStyle(context),
),
Container(
width: (displayWidth(context)*0.3),
height: (displayWidth(context)*0.3),
decoration: BoxDecoration(
border: Border.all(
color: Colors.black,
width: 2,
SizedBox(height: displayHeight(context) * 0.05,),
LinksTile(),
SizedBox(height: displayHeight(context) * 0.05,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: (displayWidth(context)*0.5),
child: Text(
'This app was developed by Open Source Agriculture. We are siblings who are passionate about agriculture and open-source.',
style: bodyTextStyle(context),
),
),
),
child: Image(
image: AssetImage('assets/credits_selfie.jpg'),
fit: BoxFit.fill
),
Container(
width: (displayWidth(context)*0.3),
height: (displayWidth(context)*0.3),
decoration: BoxDecoration(
border: Border.all(
color: Colors.black,
width: 2,
),
),
child: Image(
image: AssetImage('assets/credits_selfie.jpg'),
fit: BoxFit.fill
),
),
],
),
],
),
],
),
),
),
),
],
)
);
}
}
Expand Down
114 changes: 60 additions & 54 deletions lib/screens/home.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hive/hive.dart';
import 'package:soil_mate/models/taxonomy_term.dart';
import 'package:soil_mate/screens/side_bar/drawer.dart';
import 'package:soil_mate/screens/credits.dart';
import 'package:soil_mate/services/sizes_and_themes.dart';
import 'package:soil_mate/services/taxonomy_terms.dart';

class Home extends StatefulWidget {
@override
Expand All @@ -18,72 +13,83 @@ class _HomeState extends State<Home> {
Widget build(BuildContext context) {
return Scaffold(
drawer: SizedBox(
width: displayWidth(context)*0.66,
width: displayWidth(context)*0.7,
child: Drawer(
child: CustomDraw(),
),
),
backgroundColor: Colors.white,
appBar: AppBar(
//automaticallyImplyLeading: false,
title: Row(
children: [
// IconButton(icon: Icon(Icons.menu), onPressed: (){
// CustomDraw();
// }),
Text(
"Home",
style: headingTextStyle(context),
),
],
title: Text(
"Home",
style: headingTextStyle(context),
),
backgroundColor: Colors.white,
elevation: 2.0,
actions: <Widget>[],
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Center(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Column(
children: [
Text('Welcome to the ' + ' \n Soil Mate App!',
style: TextStyle(
fontFamily: 'Roboto',
fontWeight: FontWeight.w600,
fontSize: displayWidth(context) * 0.08,
body: CustomScrollView(
shrinkWrap: true,
slivers: <Widget>[
SliverPadding(
padding: const EdgeInsets.all(16.0),
sliver: SliverList(
delegate: SliverChildListDelegate(
<Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: displayHeight(context)*0.08,),
Text('Welcome to the ' + ' \n Soil LogR App!',
style: TextStyle(
fontFamily: 'Roboto',
fontWeight: FontWeight.w600,
fontSize: displayWidth(context) * 0.08,
),
),
SizedBox(height: displayHeight(context)*0.04,),
Text('To get started, choose one of our surveys', style: bodyTextStyle(context),),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('by using the top left menu', style: bodyTextStyle(context),),
RotationTransition(
turns: AlwaysStoppedAnimation(200 / 360),
child: Icon(Icons.subdirectory_arrow_right)),
],
),
],
),
SizedBox(height: displayHeight(context)*0.04,),
CircleAvatar(
radius: displayWidth(context)*0.15,
child: ClipOval(
child: Image.asset(
'assets/soil_mate_logo.png',
fit: BoxFit.fill,
),
SizedBox(height: 20,),
Text('To get started, choose one of our surveys', style: bodyTextStyle(context),),
Text('by using the top left menu', style: bodyTextStyle(context),),
Container(
color: Colors.grey.withOpacity(0.3),
child: Icon(Icons.menu)),
],
),
CircleAvatar(
backgroundImage: AssetImage('assets/soil_mate_logo.png'),
radius: displayWidth(context)*0.1,
),
Column(
children: [
Text('What is Soil Mate?', style: headingTextStyle(context),),
Text('The Soil Mate App is a tool to aid on site ', style: bodyTextStyle(context),),
Text('surveys by ' +
'automatically capturing ', style: bodyTextStyle(context),),
Text('location data', style: bodyTextStyle(context),),
],
)
),

//radius: displayWidth(context)*0.1,
),
SizedBox(height: displayHeight(context)*0.04,),
Column(
children: [
Text('What is Soil LogR?', style: headingTextStyle(context),),
SizedBox(height: displayHeight(context)*0.02,),
Text('The Soil LogR App is a tool to aid on site ', style: bodyTextStyle(context),),
Text('surveys by ' +
'automatically capturing ', style: bodyTextStyle(context),),
Text('location data', style: bodyTextStyle(context),),
],
)

],
],
),
),
),
),
],
),
);
}
Expand Down
Loading

0 comments on commit 7521a8c

Please sign in to comment.