Skip to content
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

Kotlin error #101

Merged
merged 2 commits into from
Oct 30, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"


android {
compileSdkVersion 29

Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.5.10'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:4.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.5'
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
2 changes: 1 addition & 1 deletion lib/Services/auth_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:firebase_auth/firebase_auth.dart';
class AuthWrapper extends StatelessWidget {
@override
Widget build(BuildContext context) {
final user = Provider.of<User>(context);
final user = Provider.of<User>(context,listen:false).metadata;

// return either the Home or Login screen
if (user == null) {
Expand Down
2 changes: 0 additions & 2 deletions lib/UI/create_goal_page_2.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import 'package:awesome_slider/awesome_slider.dart';
import 'package:batua/utils/constants.dart';
import 'package:flutter/material.dart';
Expand Down
6 changes: 2 additions & 4 deletions lib/UI/login_screen.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@


import 'package:batua/Services/authentication_service.dart';
import 'package:batua/Services/facebook_auth.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:modal_progress_hud/modal_progress_hud.dart';
import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart';
import '../Services/google_signin.dart';
import '../utils/constants.dart';

Expand Down Expand Up @@ -149,7 +147,7 @@ class _LoginScreenState extends State<LoginScreen> {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
return const AlertDialog(
backgroundColor: Colors.black54,
title: Text(
"Log-In Complete",
Expand Down
6 changes: 3 additions & 3 deletions lib/UI/profile_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import 'package:batua/Services/authentication_service.dart';
import 'package:batua/utils/constants.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
Expand Down Expand Up @@ -132,7 +130,9 @@ class ProfileScreen extends StatelessWidget {
),
sizedBoxBuilder(_height),
singleTextBox(
text: snapshot.data!.data()!['Mobile Number'].toString() ==
text: snapshot.data!
.data()!['Mobile Number']
.toString() ==
''
? 'No data provided'
: snapshot.data!.data()!['Mobile Number'].toString(),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies:
google_sign_in: ^5.1.1
jiffy: ^4.1.0
lint: ^1.7.2
modal_progress_hud: ^0.1.3
modal_progress_hud_nsn: ^0.1.0-nullsafety-1
provider: ^6.0.1


Expand Down