Skip to content

Commit

Permalink
End of Part 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Julow authored and Andrew Julow committed Apr 27, 2020
1 parent f6d2640 commit 9e48795
Show file tree
Hide file tree
Showing 11 changed files with 185 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ lib/generated_plugin_registrant.dart

# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
android/app/google-services.json
ios/Runner.xcodeproj/project.pbxproj
ios/Runner.xcodeproj/project.pbxproj
Binary file added assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/top_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ PODS:
- nanopb/encode (= 0.3.9011)
- nanopb/decode (0.3.9011)
- nanopb/encode (0.3.9011)
- path_provider (0.0.1):
- Flutter
- path_provider_macos (0.0.1):
- Flutter

DEPENDENCIES:
- cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
Expand All @@ -298,6 +302,8 @@ DEPENDENCIES:
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`)
- Flutter (from `Flutter`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
Expand Down Expand Up @@ -337,6 +343,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_core_web/ios"
Flutter:
:path: Flutter
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
path_provider_macos:
:path: ".symlinks/plugins/path_provider_macos/ios"

SPEC CHECKSUMS:
abseil: 18063d773f5366ff8736a050fe035a28f635fd27
Expand Down Expand Up @@ -366,6 +376,8 @@ SPEC CHECKSUMS:
GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925
leveldb-library: 55d93ee664b4007aac644a782d11da33fba316f7
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0

PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83

Expand Down
9 changes: 4 additions & 5 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
391323B624549C1E00CAEC27 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 391323B524549C1E00CAEC27 /* GoogleService-Info.plist */; };
3915B9972454B544000BD821 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3915B9962454B544000BD821 /* GoogleService-Info.plist */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
Expand Down Expand Up @@ -39,7 +39,7 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
391323B524549C1E00CAEC27 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
3915B9962454B544000BD821 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
4B20A56B8C0449CF4994B84D /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -116,7 +116,7 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
391323B524549C1E00CAEC27 /* GoogleService-Info.plist */,
3915B9962454B544000BD821 /* GoogleService-Info.plist */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -144,7 +144,6 @@
6CE5340600B65B28702F21B5 /* Pods-Runner.release.xcconfig */,
4B20A56B8C0449CF4994B84D /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -213,7 +212,7 @@
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
391323B624549C1E00CAEC27 /* GoogleService-Info.plist in Resources */,
3915B9972454B544000BD821 /* GoogleService-Info.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
Expand Down
4 changes: 4 additions & 0 deletions lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ class PlatformApp extends StatelessWidget {
return CupertinoApp(
home: Login(),
onGenerateRoute: Routes.cupertinoRoutes,
theme: CupertinoThemeData(
scaffoldBackgroundColor: Colors.white
)
);
} else {
return MaterialApp(
home: Login(),
onGenerateRoute: Routes.materialRoutes,
theme: ThemeData(scaffoldBackgroundColor: Colors.white)
);
}
}
Expand Down
69 changes: 69 additions & 0 deletions lib/src/screens/example.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// if (isIOS) {
// return Padding(
// padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 8.0),
// child: CupertinoTextField(
// keyboardType: TextInputType.emailAddress,
// placeholder: 'email',
// prefix: Padding(
// padding: const EdgeInsets.only(left: 8.0),
// child: Icon(
// CupertinoIcons.mail_solid,
// size: 35.0,
// color: Color(0xFF48a1af),
// ),
// ),
// placeholderStyle: GoogleFonts.roboto(
// textStyle: TextStyle(color: Color(0xFFc8d6e5), fontSize: 14.0),
// ),
// cursorColor: Color(0xFF263a44),
// style: GoogleFonts.roboto(
// textStyle: TextStyle(
// color: Color(0xFF4e5b60),
// fontWeight: FontWeight.bold,
// fontSize: 16.0)),
// textAlign: TextAlign.center,
// decoration: BoxDecoration(
// border: Border.all(color: Color(0xFFe2a84b), width: 2.0),
// borderRadius: BorderRadius.circular(25.0),
// ),
// obscureText: (obscureText != null) ? obscureText : false,
// ),
// );
// } else {
// return Padding(
// padding: EdgeInsets.symmetric(horizontal: 25.0, vertical: 8.0),
// child: TextField(
// keyboardType: TextInputType.emailAddress,
// decoration: InputDecoration(
// contentPadding: EdgeInsets.all(8.0),
// hintText: hintText,
// hintStyle: TextFieldStyles.placeholder(),
// border: InputBorder.none,
// prefixIcon: Padding(
// padding: const EdgeInsets.only(left: 8.0),
// child: Icon(
// Icons.email,
// size: 35.0,
// color: Color(0xFF48a1af),
// ),
// ),
// focusedBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Color(0xFFe2a84b), width: 2.0),
// borderRadius: BorderRadius.circular(25.0),
// ),
// enabledBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Color(0xFFe2a84b), width: 2.0),
// borderRadius: BorderRadius.circular(25.0),
// ),
// ),
// cursorColor: Color(0xFF263a44),
// style: GoogleFonts.roboto(
// textStyle: TextStyle(
// color: Color(0xFF4e5b60),
// fontWeight: FontWeight.bold,
// fontSize: 16.0)),
// textAlign: TextAlign.center,
// ),
// );
// }
// }
56 changes: 44 additions & 12 deletions lib/src/screens/login.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'package:farmers_market/src/styles/textfields.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'dart:io';

class Login extends StatelessWidget{
class Login extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (Platform.isIOS){
if (Platform.isIOS) {
return CupertinoPageScaffold(
child: pageBody(context),
);
Expand All @@ -16,14 +17,45 @@ class Login extends StatelessWidget{
}
}

Widget pageBody(BuildContext context){
return Center(child: (Platform.isIOS)
? CupertinoButton(child: Text('Signup'),onPressed: (){
Navigator.pushReplacementNamed(context, '/signup');
},)
: RaisedButton(child: Text('Signup'), onPressed: (){
Navigator.pushReplacementNamed(context, '/signup');
},)
);
Widget pageBody(BuildContext context) {
return ListView(
padding: EdgeInsets.all(0.0),
children: <Widget>[
Container(
height: MediaQuery.of(context).size.height * .2,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/top_bg.png'),
fit: BoxFit.fill)),
),
Container(
height: 200.0,
decoration: BoxDecoration(
image: DecorationImage(image: AssetImage('assets/images/logo.png')),
),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: TextFieldStyles.textBoxHorizontal(), vertical: TextFieldStyles.textBoxVertical()),
child: email(),
),
password(),
],
);
}

Widget email(){
if (Platform.isIOS){
return CupertinoTextField();
} else {
return TextField();
}
}

Widget password(){
if (Platform.isIOS){
return CupertinoTextField();
} else {
return TextField();
}
}
}
}
10 changes: 10 additions & 0 deletions lib/src/styles/textfields.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
abstract class TextFieldStyles {

static double textBoxHorizontal(){
return 25.0;
}

static double textBoxVertical(){
return 8.0;
}
}
37 changes: 36 additions & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
google_fonts:
dependency: "direct main"
description:
name: google_fonts
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
http:
dependency: transitive
description:
Expand Down Expand Up @@ -198,6 +205,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.7"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4+1"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
pedantic:
dependency: transitive
description:
Expand All @@ -212,6 +240,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
plugin_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -296,4 +331,4 @@ packages:
version: "3.5.0"
sdks:
dart: ">=2.7.0 <3.0.0"
flutter: ">=1.12.13+hotfix.4 <2.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
5 changes: 3 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies:
firebase_core: ^0.4.4+3
firebase_auth: ^0.16.0
cloud_firestore: ^0.13.5
google_fonts: ^1.0.0

dev_dependencies:
flutter_test:
Expand All @@ -44,8 +45,8 @@ flutter:
uses-material-design: true

# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
assets:
- assets/images/
# - images/a_dot_ham.jpeg

# An image asset can refer to one or more resolution-specific "variants", see
Expand Down

0 comments on commit 9e48795

Please sign in to comment.