|
|
|
import 'package:doublefeel_flutter/app/routes/app_pages.dart';
|
|
|
|
import 'package:doublefeel_flutter/core/theme/app_theme.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
|
|
...
|
...
|
@@ -10,9 +12,6 @@ import '../../../../core/util/app_toast.dart'; |
|
|
|
class DebugEnvironmentView extends StatelessWidget {
|
|
|
|
const DebugEnvironmentView({super.key});
|
|
|
|
|
|
|
|
static const _brandColor = Color(0xFF845EEE);
|
|
|
|
static const _titleColor = Color(0xFF0F0F11);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final environmentConfig = Get.find<AppEnvironmentConfig>();
|
|
...
|
...
|
@@ -21,15 +20,16 @@ class DebugEnvironmentView extends StatelessWidget { |
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: const Color(0xFFF7F6FA),
|
|
|
|
appBar: AppBar(
|
|
|
|
title: const Text('Debug'),
|
|
|
|
title: const Text('Env'),
|
|
|
|
centerTitle: true,
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
foregroundColor: _titleColor,
|
|
|
|
foregroundColor: context.colors.textPrimary,
|
|
|
|
elevation: 0,
|
|
|
|
),
|
|
|
|
body: SafeArea(
|
|
|
|
child: Obx(() {
|
|
|
|
final current = environmentConfig.environment.value;
|
|
|
|
final region = environmentConfig.region.value;
|
|
|
|
|
|
|
|
return ListView(
|
|
|
|
padding: const EdgeInsets.all(16),
|
|
...
|
...
|
@@ -45,11 +45,11 @@ class DebugEnvironmentView extends StatelessWidget { |
|
|
|
RadioListTile<AppEnvironment>(
|
|
|
|
value: environment,
|
|
|
|
groupValue: current,
|
|
|
|
activeColor: _brandColor,
|
|
|
|
activeColor: context.colors.primary,
|
|
|
|
title: Text(
|
|
|
|
environment.debugName,
|
|
|
|
style: const TextStyle(
|
|
|
|
color: _titleColor,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.textPrimary,
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
),
|
|
...
|
...
|
@@ -57,7 +57,9 @@ class DebugEnvironmentView extends StatelessWidget { |
|
|
|
subtitle: Text(
|
|
|
|
environmentConfig.resolveServerUrlFor(
|
|
|
|
environment,
|
|
|
|
AppConst.serverBaseUrl,
|
|
|
|
region == AppRegion.china
|
|
|
|
? AppConst.serverBaseUrl
|
|
|
|
: AppConst.serverBaseUrlGlobal,
|
|
|
|
),
|
|
|
|
maxLines: 1,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
...
|
...
|
@@ -75,6 +77,15 @@ class DebugEnvironmentView extends StatelessWidget { |
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 20,
|
|
|
|
),
|
|
|
|
ElevatedButton(
|
|
|
|
onPressed: () {
|
|
|
|
Get.toNamed(Routes.DEVELOPER_OPTIONS);
|
|
|
|
},
|
|
|
|
child: const Text('DEVELOPER OPTIONS'),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}),
|
...
|
...
|
|