Skip to content

Commit

Permalink
Minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
royarg02 committed Jan 12, 2020
1 parent 3b2d87d commit 6f04642
Show file tree
Hide file tree
Showing 13 changed files with 159 additions and 42 deletions.
1 change: 1 addition & 0 deletions .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}]}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

local.properties
6 changes: 3 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
Expand All @@ -56,6 +56,6 @@ flutter {

dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.android.tools.build:gradle:3.5.3'
}
}

Expand Down
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
org.gradle.jvmargs=-Xmx1536M

android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion lib/data/all_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final List<Map<String, dynamic>> devDetails = [
{
'Name': 'ANURAG ROY',
'Github': 'RoyARG02',
'Bio': 'Programming language nomad | Flutter noob',
'Bio': 'Programming language nomad, and a Flutter developer.',
'Twitter': '_royarg'
},
{
Expand Down
26 changes: 15 additions & 11 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,22 @@ import 'pages/Analysis.dart';
import 'pages/Overview.dart';

void main() async {
WidgetsFlutterBinding
.ensureInitialized(); //for awaiting to load sharedPreferences
await loadPrefs();
runApp(MultiProvider(
providers: [
ChangeNotifierProvider<ThemeState>(
builder: (context) => ThemeState(),
),
ChangeNotifierProvider<SelectedCardState>(
builder: (context) => SelectedCardState(),
),
],
child: Root(),
));
runApp(
MultiProvider(
providers: [
ChangeNotifierProvider<ThemeState>(
create: (context) => ThemeState(),
),
ChangeNotifierProvider<SelectedCardState>(
create: (context) => SelectedCardState(),
),
],
child: Root(),
),
);
}

class Root extends StatelessWidget {
Expand Down
11 changes: 10 additions & 1 deletion lib/pages/Analysis.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,17 @@ class _AnalysisState extends State<Analysis> {
final DateTime picked = await showDatePicker(
context: context,
initialDate: date,
firstDate: DateTime(date.year),
firstDate: oldestDate,
lastDate: now,
builder: (BuildContext context, Widget child) {
return Theme(
data: Theme.of(context).copyWith(
buttonBarTheme: ButtonBarTheme.of(context)
.copyWith(buttonTextTheme: ButtonTextTheme.normal),
),
child: child,
);
},
);
if (picked != null && picked != date) {
date = picked;
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/Credits.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class _CreditsState extends State<Credits> {
style: Theme.of(context).textTheme.caption.copyWith(
fontSize: appWidth(context) * 0.03,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
Expand Down
3 changes: 2 additions & 1 deletion lib/utils/date_func.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import 'package:intl/intl.dart';

final DateTime oldestDate = DateTime(2019, 08, 01);
final DateTime now = DateTime.now();
DateTime date = now;

Expand All @@ -24,4 +25,4 @@ void nextDate() {
date = date.add(Duration(days: 1));
}

bool isNow() => now.difference(date) < Duration(days: 1);
bool isNow() => now.difference(date) < Duration(days: 1);
8 changes: 0 additions & 8 deletions local.properties

This file was deleted.

125 changes: 114 additions & 11 deletions pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.4.0"
boolean_selector:
dependency: transitive
description:
Expand All @@ -29,13 +43,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2"
version: "0.1.3"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -47,12 +75,17 @@ packages:
name: flutter_image
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "3.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
font_awesome_flutter:
dependency: "direct main"
description:
Expand All @@ -74,6 +107,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.3"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
intl:
dependency: transitive
description:
Expand All @@ -87,14 +127,14 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.5"
version: "0.12.6"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.7"
version: "1.1.8"
path:
dependency: transitive
description:
Expand All @@ -116,13 +156,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
provider:
dependency: "direct main"
description:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0+1"
version: "3.2.0"
quiver:
dependency: transitive
description:
Expand All @@ -136,7 +190,28 @@ packages:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.3+5"
version: "0.5.6"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+3"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2+2"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -190,7 +265,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.5"
version: "0.2.11"
typed_data:
dependency: transitive
description:
Expand All @@ -204,14 +279,42 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.1"
version: "5.4.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+2"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0+2"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
sdks:
dart: ">=2.2.2 <3.0.0"
flutter: ">=1.5.9-pre.94 <1.10.15-pre.144"
dart: ">=2.4.0 <3.0.0"
flutter: ">=1.12.13+hotfix.4 <2.0.0"
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: soil_moisture_app
description: A new Flutter project.

version: 1.0.0+1
version: 1.0.2+10002

environment:
sdk: ">=2.2.2 <3.0.0"
Expand All @@ -12,12 +12,12 @@ dependencies:
percent_indicator: ^2.1.1+1
syncfusion_flutter_charts: ^1.0.0-beta.4
font_awesome_flutter: ^8.5.0
url_launcher: ^5.2.1
flutter_image: ^2.0.1
url_launcher: ^5.4.1
flutter_image: ^3.0.0
provider: ^3.1.0+1
shared_preferences: ^0.5.3+5
shared_preferences: ^0.5.6

cupertino_icons: ^0.1.2
cupertino_icons: ^0.1.3
http:

dev_dependencies:
Expand Down

0 comments on commit 6f04642

Please sign in to comment.