1
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 15 KiB |
BIN
assets/images/history_empty_state.gif
Normal file
|
After Width: | Height: | Size: 294 KiB |
BIN
assets/images/home_background.png
Normal file → Executable file
|
Before Width: | Height: | Size: 510 KiB After Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 625 B After Width: | Height: | Size: 560 B |
BIN
assets/images/home_more.png
Executable file → Normal file
|
Before Width: | Height: | Size: 963 B After Width: | Height: | Size: 786 B |
|
Before Width: | Height: | Size: 37 KiB |
BIN
assets/images/record_subscript.gif
Normal file
|
After Width: | Height: | Size: 337 KiB |
BIN
assets/images/setrring_subscript.gif
Normal file
|
After Width: | Height: | Size: 152 KiB |
BIN
assets/images/suspended_decoration.png
Executable file
|
After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 10 KiB |
BIN
assets/launcher_icon/launcher_icon.png
Executable file → Normal file
|
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 586 KiB |
|
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 187 KiB |
|
After Width: | Height: | Size: 955 B |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 333 KiB |
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 546 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 142 KiB |
@ -20,16 +20,19 @@ class Assets {
|
||||
static const String imagesDeleteIcon = 'assets/images/delete_icon.png';
|
||||
static const String imagesExchangeLanguage = 'assets/images/exchange_language.png';
|
||||
static const String imagesFullScreen = 'assets/images/full_screen.png';
|
||||
static const String imagesHistoryEmptyState = 'assets/images/history_empty_state.gif';
|
||||
static const String imagesHomeBackground = 'assets/images/home_background.png';
|
||||
static const String imagesHomeMicrophone = 'assets/images/home_microphone.png';
|
||||
static const String imagesHomeMore = 'assets/images/home_more.png';
|
||||
static const String imagesMicrophoneIcon = 'assets/images/microphone_icon.png';
|
||||
static const String imagesRabbitEars = 'assets/images/rabbit_ears.png';
|
||||
static const String imagesRabbitSayGood = 'assets/images/rabbit_say_good.png';
|
||||
static const String imagesRecordSubscript = 'assets/images/record_subscript.gif';
|
||||
static const String imagesRotateIcon = 'assets/images/rotate_icon.png';
|
||||
static const String imagesSetrringSubscript = 'assets/images/setrring_subscript.gif';
|
||||
static const String imagesSpeakFace = 'assets/images/speak_face.png';
|
||||
static const String imagesSpeakerIcon = 'assets/images/speaker_icon.png';
|
||||
static const String imagesStarGreen = 'assets/images/star_green.png';
|
||||
static const String imagesSuspendedDecoration = 'assets/images/suspended_decoration.png';
|
||||
static const String imagesTitleBackground = 'assets/images/title_background.png';
|
||||
static const String imagesToolsDialog = 'assets/images/tools_dialog.png';
|
||||
static const String imagesToolsHistory = 'assets/images/tools_history.png';
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import 'dart:ui';
|
||||
|
||||
class GlobalConfig {
|
||||
static const appName = 'TransLark';
|
||||
static const appName = 'TransGlobe';
|
||||
static const appColor = Color(0xffFF5122);
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:trans_lark/generated/assets.dart';
|
||||
import 'package:trans_lark/global/global_config.dart';
|
||||
import 'package:trans_lark/page/index/index_controller.dart';
|
||||
import 'package:trans_lark/util/t_object_utils.dart';
|
||||
import 'package:trans_lark/widget/t_language_bar_widget.dart';
|
||||
@ -25,7 +26,7 @@ class IndexView extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
_buildHead(),
|
||||
Expanded(child: Container()),
|
||||
const SizedBox(height: 42),
|
||||
_buildDailyQuote(),
|
||||
Expanded(child: Container()),
|
||||
_buildTools(),
|
||||
@ -44,34 +45,30 @@ class IndexView extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
Assets.imagesTitleBackground,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: const Text(
|
||||
"Instant Translator",
|
||||
style: TextStyle(
|
||||
color: Color(0xff1E1E1E),
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: logic.openSettingsBottomSheet,
|
||||
child: ClipOval(
|
||||
child: Container(
|
||||
width: 36,
|
||||
height: 36,
|
||||
padding: const EdgeInsets.all(6.5),
|
||||
decoration: BoxDecoration(
|
||||
color: GlobalConfig.appColor,
|
||||
borderRadius: BorderRadius.circular(36),
|
||||
),
|
||||
child: Image.asset(
|
||||
Assets.imagesHomeMore,
|
||||
width: 32,
|
||||
height: 32,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Text(
|
||||
GlobalConfig.appName,
|
||||
style: TextStyle(
|
||||
color: Color(0xff1E1E1E),
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 36),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -80,233 +77,204 @@ class IndexView extends StatelessWidget {
|
||||
Widget _buildDailyQuote() {
|
||||
return GestureDetector(
|
||||
onTap: logic.toSceneCategory,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.5,
|
||||
color: const Color(0xff3AAA72),
|
||||
),
|
||||
color: const Color(0xff78dfa8),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Positioned(
|
||||
top: 16,
|
||||
right: 31,
|
||||
left: 31,
|
||||
child: Image.asset(
|
||||
Assets.imagesDailyQuoteBackground,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 28, left: 22, bottom: 31),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xffBFE9D4),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
alignment: AlignmentDirectional.bottomStart,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 30,
|
||||
vertical: 15,
|
||||
),
|
||||
child: Stack(
|
||||
alignment: AlignmentDirectional.bottomStart,
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 2.8,
|
||||
child: Container(
|
||||
width: 73,
|
||||
height: 7,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xfffff0a0),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
const Text(
|
||||
"Daily Quote",
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontStyle: FontStyle.italic,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.only(left: 5),
|
||||
child: Image.asset(
|
||||
Assets.imagesArrowRight,
|
||||
width: 10,
|
||||
height: 10,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
Positioned(
|
||||
bottom: 2.8,
|
||||
child: Container(
|
||||
width: 73,
|
||||
height: 7,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff5CC2AD),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 168,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
border: const Border(
|
||||
top: BorderSide(
|
||||
width: 1.5,
|
||||
color: Color(0xff1AB069),
|
||||
),
|
||||
),
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
const Text(
|
||||
"Daily Quote",
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontStyle: FontStyle.italic,
|
||||
color: Color(0xff240F69),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.only(left: 5),
|
||||
child: Image.asset(
|
||||
Assets.imagesArrowRight,
|
||||
color: const Color(0xff240F69),
|
||||
width: 14,
|
||||
height: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Positioned(
|
||||
right: -20,
|
||||
bottom: -31,
|
||||
child: Image.asset(
|
||||
Assets.imagesSuspendedDecoration,
|
||||
width: 211.41,
|
||||
height: 99.14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 168,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
alignment: Alignment.center,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(16),
|
||||
bottomRight: Radius.circular(16),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Obx(() {
|
||||
Obx(() {
|
||||
return Text(
|
||||
logic.fromLanguage.value != null
|
||||
? logic.fromLanguage.value!.languageName
|
||||
: '',
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Color(0xffC2C3C5),
|
||||
),
|
||||
);
|
||||
}),
|
||||
const SizedBox(height: 9),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Obx(() {
|
||||
return Text(
|
||||
logic.fromLanguage.value != null
|
||||
? logic
|
||||
.fromLanguage.value!.languageName
|
||||
: '',
|
||||
TObjectUtils.getStr(logic.fromStr.value),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Color(0xffC2C3C5),
|
||||
fontSize: 16,
|
||||
color: Color(0xff152A3D),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
);
|
||||
}),
|
||||
const SizedBox(height: 9),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Obx(() {
|
||||
return Text(
|
||||
TObjectUtils.getStr(
|
||||
logic.fromStr.value),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
color: Color(0xff152A3D),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () => logic.translatorTtsPlay(true),
|
||||
child: Container(
|
||||
width: 24,
|
||||
height: 24,
|
||||
padding: const EdgeInsets.all(3),
|
||||
decoration: BoxDecoration(
|
||||
color: GlobalConfig.appColor,
|
||||
borderRadius: BorderRadius.circular(12)),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
Assets.imagesSpeakerIcon,
|
||||
width: 16,
|
||||
height: 16,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () =>
|
||||
logic.translatorTtsPlay(true),
|
||||
child: Container(
|
||||
width: 24,
|
||||
height: 24,
|
||||
padding: const EdgeInsets.all(3),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff4ECA8C),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12)),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
Assets.imagesSpeakerIcon,
|
||||
width: 16,
|
||||
height: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Divider(height: 1, thickness: 1),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Obx(() {
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(height: 1, thickness: 1),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Obx(() {
|
||||
return Text(
|
||||
logic.toLanguage.value != null
|
||||
? logic.toLanguage.value!.languageName
|
||||
: '',
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Color(0xffC2C3C5),
|
||||
),
|
||||
);
|
||||
}),
|
||||
const SizedBox(height: 9),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Obx(() {
|
||||
return Text(
|
||||
logic.toLanguage.value != null
|
||||
? logic.toLanguage.value!.languageName
|
||||
: '',
|
||||
TObjectUtils.getStr(logic.toStr.value),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Color(0xffC2C3C5),
|
||||
fontSize: 16,
|
||||
color: Color(0xff152A3D),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
);
|
||||
}),
|
||||
const SizedBox(height: 9),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Obx(() {
|
||||
return Text(
|
||||
TObjectUtils.getStr(
|
||||
logic.toStr.value),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
color: Color(0xff152A3D),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () => logic.translatorTtsPlay(false),
|
||||
child: Container(
|
||||
width: 24,
|
||||
height: 24,
|
||||
padding: const EdgeInsets.all(3),
|
||||
decoration: BoxDecoration(
|
||||
color: GlobalConfig.appColor,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
Assets.imagesSpeakerIcon,
|
||||
width: 16,
|
||||
height: 16,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () =>
|
||||
logic.translatorTtsPlay(false),
|
||||
child: Container(
|
||||
width: 24,
|
||||
height: 24,
|
||||
padding: const EdgeInsets.all(3),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff4ECA8C),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12),
|
||||
),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
Assets.imagesSpeakerIcon,
|
||||
width: 16,
|
||||
height: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Positioned(
|
||||
top: -22,
|
||||
right: 5,
|
||||
child: Image.asset(
|
||||
Assets.imagesRabbitSayGood,
|
||||
width: 137,
|
||||
height: 115,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -323,10 +291,10 @@ class IndexView extends StatelessWidget {
|
||||
child: Container(
|
||||
width: 72,
|
||||
height: 72,
|
||||
padding: const EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xffD2FFFB),
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(72),
|
||||
),
|
||||
child: Image.asset(
|
||||
Assets.imagesToolsPhoto,
|
||||
@ -354,10 +322,10 @@ class IndexView extends StatelessWidget {
|
||||
child: Container(
|
||||
width: 72,
|
||||
height: 72,
|
||||
padding: const EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xffE1E2FE),
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(72),
|
||||
),
|
||||
child: Image.asset(
|
||||
Assets.imagesToolsDialog,
|
||||
@ -385,10 +353,10 @@ class IndexView extends StatelessWidget {
|
||||
child: Container(
|
||||
width: 72,
|
||||
height: 72,
|
||||
padding: const EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xffFEE5C5),
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(72),
|
||||
),
|
||||
child: Image.asset(
|
||||
Assets.imagesToolsHistory,
|
||||
@ -422,9 +390,8 @@ class IndexView extends StatelessWidget {
|
||||
height: 91,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff7678ef),
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
border: Border.all(width: 1.5, color: const Color(0xff5153c0)),
|
||||
color: GlobalConfig.appColor,
|
||||
borderRadius: BorderRadius.circular(22),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
@ -442,17 +409,15 @@ class IndexView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
right: 20,
|
||||
),
|
||||
padding: const EdgeInsets.only(right: 20),
|
||||
child: GestureDetector(
|
||||
onTap: logic.onTapSpeak,
|
||||
child: Container(
|
||||
height: 36,
|
||||
width: 36,
|
||||
padding: const EdgeInsets.all(5),
|
||||
padding: const EdgeInsets.all(7),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff5153c0),
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(18),
|
||||
),
|
||||
child: Image.asset(
|
||||
@ -467,6 +432,7 @@ class IndexView extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const TLanguageBarWidget(),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:trans_lark/generated/assets.dart';
|
||||
import 'package:trans_lark/global/global_config.dart';
|
||||
import 'package:trans_lark/global/speech_to_text_manager.dart';
|
||||
import 'package:trans_lark/page/p2p/p2p_controller.dart';
|
||||
import 'package:trans_lark/util/t_object_utils.dart';
|
||||
@ -76,8 +77,8 @@ class P2PView extends GetView<P2PController> {
|
||||
child: WaveWidget(
|
||||
config: CustomConfig(
|
||||
colors: [
|
||||
const Color(0xff45A7FE).withOpacity(0.2),
|
||||
const Color(0xff45A7FE),
|
||||
const Color(0xff87ECB3).withOpacity(0.2),
|
||||
const Color(0xff87ECB3),
|
||||
],
|
||||
durations: [4000, 8000],
|
||||
heightPercentages: [-0.08, -0.08],
|
||||
@ -92,7 +93,7 @@ class P2PView extends GetView<P2PController> {
|
||||
: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
color: const Color(0xff45A7FE),
|
||||
color: const Color(0xff87ECB3),
|
||||
),
|
||||
);
|
||||
}),
|
||||
@ -182,8 +183,8 @@ class P2PView extends GetView<P2PController> {
|
||||
? WaveWidget(
|
||||
config: CustomConfig(
|
||||
colors: [
|
||||
const Color(0xff87ECB3).withOpacity(0.2),
|
||||
const Color(0xff87ECB3),
|
||||
GlobalConfig.appColor.withOpacity(0.2),
|
||||
GlobalConfig.appColor,
|
||||
],
|
||||
durations: [4000, 8000],
|
||||
heightPercentages: [-0.08, -0.08],
|
||||
@ -197,7 +198,7 @@ class P2PView extends GetView<P2PController> {
|
||||
: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
color: const Color(0xff87ECB3),
|
||||
color: GlobalConfig.appColor,
|
||||
),
|
||||
);
|
||||
}),
|
||||
|
||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:trans_lark/entity/scene_entity.dart';
|
||||
import 'package:trans_lark/generated/assets.dart';
|
||||
import 'package:trans_lark/global/global_config.dart';
|
||||
import 'package:trans_lark/page/scene_category_item/scene_category_item_controller.dart';
|
||||
import 'package:trans_lark/widget/t_base_appbar_widget.dart';
|
||||
import 'package:trans_lark/widget/t_base_scrollbar_widget.dart';
|
||||
@ -108,12 +109,12 @@ class SceneCategoryItemView extends GetView<SceneCategoryItemController> {
|
||||
child: Container(
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: const Color.fromRGBO(78, 202, 140, 0.20),
|
||||
color: GlobalConfig.appColor.withOpacity(.2),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
Assets.imagesSpeakerIcon,
|
||||
color: const Color(0xff4ECA8C),
|
||||
color: GlobalConfig.appColor,
|
||||
width: 16,
|
||||
height: 16,
|
||||
),
|
||||
|
||||
@ -34,7 +34,7 @@ class SettingsWidget extends StatelessWidget {
|
||||
Image.asset(
|
||||
Assets.imagesHomeBackground,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 384,
|
||||
height: double.infinity,
|
||||
fit: BoxFit.fitWidth,
|
||||
),
|
||||
Column(
|
||||
@ -92,9 +92,9 @@ class SettingsWidget extends StatelessWidget {
|
||||
),
|
||||
_buildSettingItems(),
|
||||
Image.asset(
|
||||
Assets.imagesRabbitSayGood,
|
||||
width: 90,
|
||||
height: 90,
|
||||
Assets.imagesSetrringSubscript,
|
||||
width: 136,
|
||||
height: 136,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
const SizedBox(height: 58),
|
||||
|
||||
@ -2,6 +2,7 @@ import 'package:custom_pop_up_menu/custom_pop_up_menu.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:trans_lark/generated/assets.dart';
|
||||
import 'package:trans_lark/global/global_config.dart';
|
||||
import 'package:trans_lark/page/translator/translator_controller.dart';
|
||||
import 'package:trans_lark/util/t_object_utils.dart';
|
||||
import 'package:trans_lark/widget/t_base_appbar_widget.dart';
|
||||
@ -24,10 +25,9 @@ class TranslatorView extends GetView<TranslatorController> {
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.5, color: const Color(0xff0087FF)),
|
||||
color: const Color(0xff45A7FE),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
||||
decoration: const BoxDecoration(
|
||||
color: GlobalConfig.appColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@ -74,7 +74,7 @@ class TranslatorView extends GetView<TranslatorController> {
|
||||
replacement: Container(
|
||||
width: 36,
|
||||
height: 36,
|
||||
color: const Color(0xff8BCFFE),
|
||||
color: Colors.white,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
@ -208,15 +208,7 @@ class TranslatorView extends GetView<TranslatorController> {
|
||||
],
|
||||
),
|
||||
)
|
||||
: Expanded(
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
Assets.imagesRabbitSayGood,
|
||||
width: 90,
|
||||
height: 90,
|
||||
),
|
||||
),
|
||||
),
|
||||
: Expanded(child: Container()),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:trans_lark/generated/assets.dart';
|
||||
import 'package:trans_lark/global/global_config.dart';
|
||||
import 'package:trans_lark/page/translator_record/translator_record_controller.dart';
|
||||
import 'package:trans_lark/util/t_object_utils.dart';
|
||||
import 'package:trans_lark/widget/t_base_appbar_widget.dart';
|
||||
@ -23,9 +24,9 @@ class TranslatorRecordView extends GetView<TranslatorRecordController> {
|
||||
if (controller.historyList.isNotEmpty) return _buildHistoryList();
|
||||
return Center(
|
||||
child: Image.asset(
|
||||
Assets.imagesRabbitSayGood,
|
||||
width: 90,
|
||||
height: 90,
|
||||
Assets.imagesHistoryEmptyState,
|
||||
width: 168,
|
||||
height: 168,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
);
|
||||
@ -35,12 +36,12 @@ class TranslatorRecordView extends GetView<TranslatorRecordController> {
|
||||
return Visibility(
|
||||
visible: controller.historyList.isNotEmpty,
|
||||
child: Positioned(
|
||||
top: 59,
|
||||
right: 23,
|
||||
top: 44,
|
||||
right: 20,
|
||||
child: Image.asset(
|
||||
Assets.imagesRabbitSayGood,
|
||||
width: 90,
|
||||
height: 90,
|
||||
Assets.imagesRecordSubscript,
|
||||
width: 96,
|
||||
height: 96,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
@ -87,7 +88,7 @@ class TranslatorRecordView extends GetView<TranslatorRecordController> {
|
||||
onDismissed: (_) =>
|
||||
controller.deleteHistoryItem(map.key, item, index),
|
||||
background: Container(
|
||||
color: const Color(0xffFF98BC),
|
||||
color: const Color(0xffFC6C6B),
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
@ -105,7 +106,7 @@ class TranslatorRecordView extends GetView<TranslatorRecordController> {
|
||||
),
|
||||
),
|
||||
secondaryBackground: Container(
|
||||
color: const Color(0xffFF98BC),
|
||||
color: const Color(0xffFC6C6B),
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
@ -134,7 +135,7 @@ class TranslatorRecordView extends GetView<TranslatorRecordController> {
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 32,
|
||||
color: const Color(0xff4ECA8C),
|
||||
color: GlobalConfig.appColor,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:trans_lark/generated/assets.dart';
|
||||
import 'package:trans_lark/global/global_config.dart';
|
||||
import 'package:trans_lark/global/translate_manager.dart';
|
||||
import 'package:trans_lark/page/translator_result/translator_result_controller.dart';
|
||||
import 'package:trans_lark/util/t_object_utils.dart';
|
||||
@ -98,12 +99,12 @@ class TranslatorResultView extends GetView<TranslatorResultController> {
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 32,
|
||||
color: const Color.fromRGBO(78, 202, 140, 0.20),
|
||||
color: GlobalConfig.appColor,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
Assets.imagesSpeakerIcon,
|
||||
color: const Color(0xff4ECA8C),
|
||||
color: Colors.white,
|
||||
width: 20,
|
||||
height: 20,
|
||||
),
|
||||
@ -151,7 +152,7 @@ class TranslatorResultView extends GetView<TranslatorResultController> {
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
color: Color(0xff4ECA8C),
|
||||
color: GlobalConfig.appColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -186,12 +187,12 @@ class TranslatorResultView extends GetView<TranslatorResultController> {
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 32,
|
||||
color: const Color.fromRGBO(78, 202, 140, 0.20),
|
||||
color: GlobalConfig.appColor,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
Assets.imagesSpeakerIcon,
|
||||
color: const Color(0xff4ECA8C),
|
||||
color: Colors.white,
|
||||
width: 20,
|
||||
height: 20,
|
||||
),
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:trans_lark/generated/assets.dart';
|
||||
import 'package:trans_lark/global/global_config.dart';
|
||||
import 'package:trans_lark/global/translate_manager.dart';
|
||||
import 'package:trans_lark/widget/t_language_bottom_sheet.dart';
|
||||
|
||||
@ -44,7 +45,7 @@ class TLanguageBarWidget extends StatelessWidget {
|
||||
.isSelectFromLanguage
|
||||
.value
|
||||
? const Color(0xff435561)
|
||||
: const Color(0xff4ECA8C),
|
||||
: GlobalConfig.appColor,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@ -71,7 +72,7 @@ class TLanguageBarWidget extends StatelessWidget {
|
||||
width: 26,
|
||||
height: 18,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xffF1F1F1),
|
||||
color: const Color(0xfff1f1f1),
|
||||
borderRadius: BorderRadius.circular(9),
|
||||
),
|
||||
child: FittedBox(
|
||||
@ -109,7 +110,7 @@ class TLanguageBarWidget extends StatelessWidget {
|
||||
.isSelectFromLanguage
|
||||
.value
|
||||
? const Color(0xff435561)
|
||||
: const Color(0xff4ECA8C),
|
||||
: GlobalConfig.appColor,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
@ -3,6 +3,7 @@ import 'package:get/get.dart';
|
||||
import 'package:get/get_state_manager/get_state_manager.dart';
|
||||
import 'package:trans_lark/entity/language_entity.dart';
|
||||
import 'package:trans_lark/generated/assets.dart';
|
||||
import 'package:trans_lark/global/global_config.dart';
|
||||
import 'package:trans_lark/global/translate_manager.dart';
|
||||
import 'package:trans_lark/page/index/index_controller.dart';
|
||||
import 'package:trans_lark/widget/t_base_scrollbar_widget.dart';
|
||||
@ -75,14 +76,14 @@ class TLanguageBottomSheet extends StatelessWidget {
|
||||
.fromLanguageEntity
|
||||
.value
|
||||
.languageName
|
||||
? const Color(0xff4ECA8C)
|
||||
? GlobalConfig.appColor
|
||||
: const Color(0xff152A3D))
|
||||
: (item.languageName ==
|
||||
TranslateManager()
|
||||
.toLanguageEntity
|
||||
.value
|
||||
.languageName
|
||||
? const Color(0xff4ECA8C)
|
||||
? GlobalConfig.appColor
|
||||
: const Color(0xff152A3D)),
|
||||
fontSize: 16,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@ -107,6 +108,7 @@ class TLanguageBottomSheet extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(left: 10),
|
||||
child: Image.asset(
|
||||
Assets.imagesStarGreen,
|
||||
color: GlobalConfig.appColor,
|
||||
width: 16,
|
||||
height: 16,
|
||||
),
|
||||
|
||||
@ -42,13 +42,14 @@ class TLanguageResultBarWidget extends StatelessWidget {
|
||||
width: 26,
|
||||
height: 18,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: const Color(0xff7FD5AA),
|
||||
borderRadius: BorderRadius.circular(9),
|
||||
),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
Assets.imagesExchangeLanguage,
|
||||
color: Colors.white,
|
||||
width: 12,
|
||||
height: 12,
|
||||
),
|
||||
|
||||
@ -3,6 +3,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:trans_lark/generated/assets.dart';
|
||||
import 'package:trans_lark/global/flutter_tts_manager.dart';
|
||||
import 'package:trans_lark/global/global_config.dart';
|
||||
import 'package:trans_lark/global/translate_manager.dart';
|
||||
|
||||
class TTranslateTextFullScreenPage extends StatefulWidget {
|
||||
@ -42,7 +43,7 @@ class _TranslateTextFullScreenPageState
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
color: const Color(0xff4ECA8C),
|
||||
color: GlobalConfig.appColor,
|
||||
child: SafeArea(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@ -76,10 +77,11 @@ class _TranslateTextFullScreenPageState
|
||||
width: 32,
|
||||
height: 32,
|
||||
color: Colors.white,
|
||||
padding: const EdgeInsets.all(6),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.none,
|
||||
child: Image.asset(
|
||||
Assets.imagesSpeakerIcon,
|
||||
color: GlobalConfig.appColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||