-
-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1378 Update Talawa to give a meaningful message if the URL isn…
…'t available. (#1380) * feat: Add proper error handling if url not available. * Fix #1378 Update Talawa to give a meaningful message if the URL isn't available. * fixes the failed checks. * Make the suggested changes * Add error widget * Add custom error snackbar for Talawa * Make the notif bar scrollable. * Remove the useless part * Add dialog box with scroll instead of snackbar * added the custom widget * added the custom widget * Completed the request changes. * removed all the warnings * changed the app-setting test * Add test for custom error widget and did err-handling in qrScan * removed all warnings * Update build.gradle * Delete google-services.json * Update build.gradle * Delete GoogleService-Info.plist * Delete firebase_app_id_file.json
- Loading branch information
1 parent
9765102
commit eeabcb5
Showing
13 changed files
with
360 additions
and
24 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
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,35 @@ | ||
import 'package:auto_size_text/auto_size_text.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class TalawaErrorDialog extends StatelessWidget { | ||
const TalawaErrorDialog(this.errorMessage, {Key? key}) : super(key: key); | ||
final String errorMessage; | ||
@override | ||
Widget build(BuildContext context) { | ||
return SizedBox( | ||
child: AlertDialog( | ||
title: const Text( | ||
"Error", | ||
style: TextStyle(color: Colors.red), | ||
), | ||
content: SizedBox( | ||
width: 200, | ||
height: 75, | ||
child: AutoSizeText( | ||
errorMessage, | ||
style: const TextStyle(fontSize: 20), | ||
maxLines: 3, | ||
), | ||
), | ||
actions: <Widget>[ | ||
TextButton( | ||
child: const Text('Close'), | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
}, | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
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,40 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class TalawaErrorWidget extends StatelessWidget { | ||
const TalawaErrorWidget({Key? key, required this.errorMessage}) | ||
: super(key: key); | ||
final String errorMessage; | ||
@override | ||
Widget build(BuildContext context) { | ||
return Row( | ||
children: [ | ||
Container( | ||
width: 20, | ||
height: 80, | ||
decoration: const BoxDecoration(color: Colors.red), | ||
), | ||
const SizedBox( | ||
width: 10, | ||
), | ||
const Icon( | ||
Icons.error, | ||
color: Colors.red, | ||
size: 35, | ||
), | ||
const SizedBox( | ||
width: 10, | ||
), | ||
Expanded( | ||
flex: 1, | ||
child: SingleChildScrollView( | ||
scrollDirection: Axis.horizontal, | ||
child: Text( | ||
errorMessage, | ||
style: const TextStyle(color: Colors.white), | ||
), | ||
), | ||
) | ||
], | ||
); | ||
} | ||
} |
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
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.