Skip to content

Commit

Permalink
feat: semaphore for LG connection
Browse files Browse the repository at this point in the history
  • Loading branch information
MurilonND committed Aug 9, 2023
1 parent e18f9d1 commit 9cc9330
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ class _ApiKeyRepositoryPageState extends State<ApiKeyRepositoryPage> {
elevation: 0,
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
actions: [
Row(
children: [
Text(_galaxyCubit.state.client != null && !_galaxyCubit.state.client!.isClosed ? "Connected" : "Disconnected",style: const TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 18),),
Icon(Icons.circle_rounded, color: _galaxyCubit.state.client != null && !_galaxyCubit.state.client!.isClosed ? Colors.green : Colors.red,),
const SizedBox(width: 10,),
],
)
],
),
body: Center(
child: Container(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ class _ConnectionPageState extends State<ConnectionPage> {
elevation: 0,
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
actions: [
Row(
children: [
Text(state.client != null && !state.client!.isClosed ? "Connected" : "Disconnected",style: const TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 18),),
Icon(Icons.circle_rounded, color: state.client != null && !state.client!.isClosed ? Colors.green : Colors.red,),
const SizedBox(width: 10,),
],
)
],
),
body: Center(
child: Container(
Expand Down
9 changes: 9 additions & 0 deletions lib/src/features/drawer/presentation/pages/drawer_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ class _DrawerPageState extends State<DrawerPage> {
elevation: 0,
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
actions: [
Row(
children: [
Text(_galaxyCubit.state.client != null && !_galaxyCubit.state.client!.isClosed ? "Connected" : "Disconnected",style: const TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 18),),
Icon(Icons.circle_rounded, color: _galaxyCubit.state.client != null && !_galaxyCubit.state.client!.isClosed ? Colors.green : Colors.red,),
const SizedBox(width: 10,),
],
)
],
),
body: Center(
child: SingleChildScrollView(
Expand Down
9 changes: 9 additions & 0 deletions lib/src/features/gallery/presentation/pages/galley_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,15 @@ class _GalleryPageState extends State<GalleryPage> {
elevation: 0,
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
actions: [
Row(
children: [
Text(_galaxyCubit.state.client != null && !_galaxyCubit.state.client!.isClosed ? "Connected" : "Disconnected",style: const TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 18),),
Icon(Icons.circle_rounded, color: _galaxyCubit.state.client != null && !_galaxyCubit.state.client!.isClosed ? Colors.green : Colors.red,),
const SizedBox(width: 10,),
],
)
],
),
body: Padding(
padding: const EdgeInsets.all(20),
Expand Down
15 changes: 15 additions & 0 deletions lib/src/features/home/presentation/page/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
elevation: 0,
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
actions: [
Row(
children: [
Text(_galaxyCubit.state.client != null && !_galaxyCubit.state.client!.isClosed ? "Connected" : "Disconnected",style: const TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 18),),
Icon(Icons.circle_rounded, color: _galaxyCubit.state.client != null && !_galaxyCubit.state.client!.isClosed ? Colors.green : Colors.red,),
const SizedBox(width: 10,),
],
)
],
),
body: Center(
child: SingleChildScrollView(
child: Padding(
Expand Down

0 comments on commit 9cc9330

Please sign in to comment.