-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from DAB-Co/1.0.2+4
1.0.2+4
- Loading branch information
Showing
18 changed files
with
268 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'dart:convert'; | ||
|
||
import 'package:http/http.dart'; | ||
import 'package:jam/config/app_url.dart'; | ||
import 'package:jam/providers/user_provider.dart'; | ||
import 'package:jam/widgets/show_snackbar.dart'; | ||
|
||
import '../main.dart'; | ||
|
||
/// Delete Account Call, returns answer from server, | ||
/// null if could not connect | ||
Future<String?> deleteAccountCall(String userId, String password) async { | ||
final Map<String, dynamic> dataToSend = { | ||
"user_id": userId, | ||
"password": password, | ||
}; | ||
try { | ||
var response = await post( | ||
Uri.parse(AppUrl.deleteAccount), | ||
headers: {'Content-Type': 'application/json; charset=UTF-8'}, | ||
body: json.encode(dataToSend), | ||
); | ||
if (response.body == "Wrong api token") { | ||
print("wrong api token in delete account call"); | ||
logout(); | ||
showSnackBar(navigatorKey.currentContext!, "Wrong api token"); | ||
} | ||
return response.body; | ||
} catch (err) { | ||
print(err); | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:jam/config/routes.dart'; | ||
|
||
class Explanation extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
TextStyle style = TextStyle( | ||
color: Colors.white, | ||
fontSize: 20, | ||
); | ||
return Scaffold( | ||
backgroundColor: Color(0xFFFF66C4), | ||
body: Padding( | ||
padding: | ||
const EdgeInsets.only(top: 70, bottom: 70, left: 50, right: 50), | ||
child: Column( | ||
children: [ | ||
Container( | ||
height: 200, | ||
width: 200, | ||
decoration: BoxDecoration( | ||
image: DecorationImage( | ||
fit: BoxFit.contain, | ||
image: AssetImage('assets/icon/icon.png'), | ||
), | ||
), | ||
), | ||
SizedBox(height: 20), | ||
SingleChildScrollView( | ||
child: Column( | ||
children: [ | ||
Text( | ||
"\tWelcome to Jam! This is an app that helps people with same music taste get together via spotify. The matches are made daily at the same time for everyone so you won't get a match until midnight GMT. We will send a notification to remind you. Have fun!", | ||
style: style, | ||
), | ||
], | ||
), | ||
), | ||
Expanded( | ||
child: Align( | ||
alignment: Alignment.bottomRight, | ||
child: RawMaterialButton( | ||
splashColor: Colors.white, | ||
shape: CircleBorder(), | ||
fillColor: Colors.white, | ||
child: Icon( | ||
Icons.check, | ||
color: Colors.grey, | ||
size: 50, | ||
), | ||
onPressed: () { | ||
Navigator.pushNamedAndRemoveUntil( | ||
context, | ||
chatLanguages, | ||
(Route<dynamic> route) => false, | ||
); | ||
}, | ||
), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.