Skip to content

Commit

Permalink
Add Error Widget
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
bagussubagja authored Dec 13, 2022
2 parents 64467d5 + 4c9bdc5 commit 7848c15
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 14 deletions.
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# healthy_buddy_mobile_app
# Healthy Buddy Mobile App

A new Flutter project.
Healthy Buddy Mobile App merupakan sebuah aplikasi informatif seputar kesehatan. Aplikasi ini hadir sebagai bentuk kepedulian kami terhadap kesehatan manusia. Dengan menyediakan berbagai macam kebutuhan kesehatan seperti makanan sehat, daftar olahraga yang dapat kamu lakukan, serta layanan dokter yang siap memberikanmu pelayanan terbaik!

## Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
Our Sincerely : Kelompok 4 Kualitas Perangkat Lunak
- Arfi Triawan : Backend Developer
- Bagus Subagja : Mobile Developer
- M. Faja Sumitra : UI/UX Designer
- Riyandi Firman P. : Backend Developer
- Suci Sukmawati : Project Manager
19 changes: 19 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:healthy_buddy_mobile_app/providers/providers_list.dart';
import 'package:healthy_buddy_mobile_app/routes/routes.dart';
import 'package:healthy_buddy_mobile_app/shared/theme.dart';
import 'package:provider/provider.dart';
import 'package:sizer/sizer.dart';

Expand All @@ -18,6 +19,24 @@ class MyHttpOverrides extends HttpOverrides {

void main() {
HttpOverrides.global = MyHttpOverrides();

ErrorWidget.builder = ((details) {
bool isDebug = false;
assert(() {
isDebug = true;
return true;
}());
if (isDebug) {
return ErrorWidget(details.exception);
}
return Container(
alignment: Alignment.center,
child: Text(
'Error Ditemukan Pada Aplikasi : ${details.exception}',
style: regularStyle,
),
);
});
runApp(const HealthyBuddy());
}

Expand Down

0 comments on commit 7848c15

Please sign in to comment.