mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-10 07:07:17 +00:00
Refactor menu view and add build number and environment label
This commit is contained in:
@ -4,6 +4,7 @@ import 'package:syncrow_app/features/auth/bloc/auth_cubit.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/menu_cubit.dart';
|
||||
import 'package:syncrow_app/features/menu/view/widgets/menu_list.dart';
|
||||
import 'package:syncrow_app/features/menu/view/widgets/profile/profile_tab.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/build_number_environment.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
@ -51,6 +52,7 @@ class MenuView extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
buildNumberAndEnvironmentLabel()
|
||||
],
|
||||
),
|
||||
);
|
||||
|
16
lib/features/shared_widgets/build_number_environment.dart
Normal file
16
lib/features/shared_widgets/build_number_environment.dart
Normal file
@ -0,0 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:syncrow_app/main.dart';
|
||||
|
||||
Widget buildNumberAndEnvironmentLabel() {
|
||||
String envNAME = dotenv.env['ENV_NAME'] ?? '';
|
||||
|
||||
return SizedBox(
|
||||
child: Center(
|
||||
child: Text(
|
||||
'\n$envNAME \nBuild Number $buildNumber',
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
@ -9,6 +9,9 @@ import 'package:syncrow_app/utils/bloc_observer.dart';
|
||||
import 'package:syncrow_app/utils/helpers/localization_helpers.dart';
|
||||
import 'my_app.dart';
|
||||
|
||||
|
||||
const String buildNumber = '1.0.30+17';
|
||||
|
||||
void main() {
|
||||
//to observe the state of the blocs in the output console
|
||||
Bloc.observer = MyBlocObserver();
|
||||
|
Reference in New Issue
Block a user