mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-26 06:59:40 +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,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user