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

Update permissions for url_launcher plugin #57

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package="com.example.envirocar_app_main">

<!-- Added for flutter blue -->

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
<uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
Expand Down
12 changes: 5 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.6.10'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
delete rootProject.buildDir
}
}
18 changes: 16 additions & 2 deletions lib/screens/loginScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class _LoginScreenState extends State<LoginScreen> {
String _username;
String _password;
bool _wrongCredentials = false;
bool _isObscure = true;

Future<void> _showDialogbox(String message) async {
_logger.i('Showing dialog');
Expand All @@ -53,7 +54,7 @@ class _LoginScreenState extends State<LoginScreen> {
EdgeInsets.fromLTRB(deviceWidth * 0.05, 0, deviceWidth * 0.05, 0),
child: NotificationListener<OverscrollIndicatorNotification>(
onNotification: (OverscrollIndicatorNotification overscroll) {
overscroll.disallowGlow();
overscroll.disallowIndicator();
return;
},
child: Form(
Expand Down Expand Up @@ -95,9 +96,22 @@ class _LoginScreenState extends State<LoginScreen> {

// Password
TextFormField(
obscureText: true,
obscureText: _isObscure,
decoration: inputDecoration.copyWith(
labelText: 'Password',
suffixIcon: IconButton(
icon: Icon(
_isObscure
? Icons.visibility_off_outlined
: Icons.visibility_outlined,
color: Colors.white,
),
onPressed: () {
setState(() {
_isObscure = !_isObscure;
});
},
),
),
// validator: (value) {
// return validator.validatePassword(value);
Expand Down
33 changes: 30 additions & 3 deletions lib/screens/registerScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
bool _acceptedTerms = false;
bool _acceptedPrivacy = false;
bool _showError = false;
bool _isObscure = true;

Future<void> _showDialogbox(String message) async {
_logger.i('Showing dialog');
Expand Down Expand Up @@ -58,7 +59,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
EdgeInsets.fromLTRB(deviceWidth * 0.05, 0, deviceWidth * 0.05, 0),
child: NotificationListener<OverscrollIndicatorNotification>(
onNotification: (OverscrollIndicatorNotification overscroll) {
overscroll.disallowGlow();
overscroll.disallowIndicator();
return;
},
child: Form(
Expand Down Expand Up @@ -113,9 +114,22 @@ class _RegisterScreenState extends State<RegisterScreen> {

// Password
TextFormField(
obscureText: true,
obscureText: _isObscure,
decoration: inputDecoration.copyWith(
labelText: 'Password',
suffixIcon: IconButton(
icon: Icon(
_isObscure
? Icons.visibility_off_outlined
: Icons.visibility_outlined,
color: Colors.white,
),
onPressed: () {
setState(() {
_isObscure = !_isObscure;
});
},
),
),
// validator: (value) {
// return validator.validatePassword(value);
Expand All @@ -131,9 +145,22 @@ class _RegisterScreenState extends State<RegisterScreen> {

// Confirm Password
TextFormField(
obscureText: true,
obscureText: _isObscure,
decoration: inputDecoration.copyWith(
labelText: 'Password',
suffixIcon: IconButton(
icon: Icon(
_isObscure
? Icons.visibility_off_outlined
: Icons.visibility_outlined,
color: Colors.white,
),
onPressed: () {
setState(() {
_isObscure = !_isObscure;
});
},
),
),
validator: (value) {
if (_confirmPassword.compareTo(_password) != 0) {
Expand Down
Loading