Skip to content

Commit

Permalink
Merge pull request #2316 from airqo-platform/no-internet-connection-e…
Browse files Browse the repository at this point in the history
…rror-state-UI

Add NoInternetBanner widget to display connectivity issues
  • Loading branch information
Baalmart authored Dec 10, 2024
2 parents d578810 + 987d9fb commit bfbc7e4
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions mobile-v3/lib/src/app/shared/pages/no_internet_banner.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import 'package:flutter/material.dart';

class NoInternetBanner extends StatelessWidget {
final VoidCallback onClose;

const NoInternetBanner({Key? key, required this.onClose}) : super(key: key);

@override
Widget build(BuildContext context) {
return Container(
color: Colors.red,
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Internet Connection Lost',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16.0,
),
),
IconButton(
icon: Icon(Icons.close, color: Colors.white),
onPressed: onClose,
),
],
),
);
}
}

0 comments on commit bfbc7e4

Please sign in to comment.