1
|
Before Width: | Height: | Size: 542 B After Width: | Height: | Size: 542 B |
BIN
assets/images/daily_quote_background.png
Executable file
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 749 B |
BIN
assets/images/home_background.png
Normal file
|
After Width: | Height: | Size: 510 KiB |
BIN
assets/images/home_more.png
Executable file
|
After Width: | Height: | Size: 963 B |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 14 KiB |
BIN
assets/images/rabbit_say_good.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
assets/images/title_bakcground.png
Executable file
|
After Width: | Height: | Size: 932 B |
BIN
assets/images/tools_dialog.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
assets/images/tools_history.png
Executable file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
assets/images/tools_photo.png
Executable file
|
After Width: | Height: | Size: 4.2 KiB |
@ -1,3 +0,0 @@
|
|||||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M7.5 2.91666C8.16304 2.91666 8.79893 3.18006 9.26777 3.6489C9.73661 4.11774 10 4.75362 10 5.41666V14.5833C10 15.2464 9.73661 15.8823 9.26777 16.3511C8.79893 16.8199 8.16304 17.0833 7.5 17.0833H5C4.33696 17.0833 3.70107 16.8199 3.23223 16.3511C2.76339 15.8823 2.5 15.2464 2.5 14.5833V5.41666C2.5 4.75362 2.76339 4.11774 3.23223 3.6489C3.70107 3.18006 4.33696 2.91666 5 2.91666H7.5ZM15 10.4167C15.663 10.4167 16.2989 10.6801 16.7678 11.1489C17.2366 11.6177 17.5 12.2536 17.5 12.9167V14.5833C17.5 15.2464 17.2366 15.8823 16.7678 16.3511C16.2989 16.8199 15.663 17.0833 15 17.0833H13.3333C12.6703 17.0833 12.0344 16.8199 11.5656 16.3511C11.0967 15.8823 10.8333 15.2464 10.8333 14.5833V12.9167C10.8333 12.2536 11.0967 11.6177 11.5656 11.1489C12.0344 10.6801 12.6703 10.4167 13.3333 10.4167H15ZM7.5 4.58333H5C4.77899 4.58333 4.56702 4.67113 4.41074 4.82741C4.25446 4.98369 4.16667 5.19565 4.16667 5.41666V14.5833C4.16667 14.8043 4.25446 15.0163 4.41074 15.1726C4.56702 15.3289 4.77899 15.4167 5 15.4167H7.5C7.72101 15.4167 7.93298 15.3289 8.08926 15.1726C8.24554 15.0163 8.33333 14.8043 8.33333 14.5833V5.41666C8.33333 5.19565 8.24554 4.98369 8.08926 4.82741C7.93298 4.67113 7.72101 4.58333 7.5 4.58333ZM15 12.0833H13.3333C13.1123 12.0833 12.9004 12.1711 12.7441 12.3274C12.5878 12.4837 12.5 12.6957 12.5 12.9167V14.5833C12.5 14.8043 12.5878 15.0163 12.7441 15.1726C12.9004 15.3289 13.1123 15.4167 13.3333 15.4167H15C15.221 15.4167 15.433 15.3289 15.5893 15.1726C15.7455 15.0163 15.8333 14.8043 15.8333 14.5833V12.9167C15.8333 12.6957 15.7455 12.4837 15.5893 12.3274C15.433 12.1711 15.221 12.0833 15 12.0833ZM15 2.91666C15.663 2.91666 16.2989 3.18006 16.7678 3.6489C17.2366 4.11774 17.5 4.75362 17.5 5.41666V7.08333C17.5 7.74637 17.2366 8.38226 16.7678 8.8511C16.2989 9.31994 15.663 9.58333 15 9.58333H13.3333C12.6703 9.58333 12.0344 9.31994 11.5656 8.8511C11.0967 8.38226 10.8333 7.74637 10.8333 7.08333V5.41666C10.8333 4.75362 11.0967 4.11774 11.5656 3.6489C12.0344 3.18006 12.6703 2.91666 13.3333 2.91666H15ZM15 4.58333H13.3333C13.1123 4.58333 12.9004 4.67113 12.7441 4.82741C12.5878 4.98369 12.5 5.19565 12.5 5.41666V7.08333C12.5 7.30434 12.5878 7.51631 12.7441 7.67259C12.9004 7.82887 13.1123 7.91666 13.3333 7.91666H15C15.221 7.91666 15.433 7.82887 15.5893 7.67259C15.7455 7.51631 15.8333 7.30434 15.8333 7.08333V5.41666C15.8333 5.19565 15.7455 4.98369 15.5893 4.82741C15.433 4.67113 15.221 4.58333 15 4.58333Z" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.5 KiB |
@ -2,21 +2,23 @@
|
|||||||
class Assets {
|
class Assets {
|
||||||
Assets._();
|
Assets._();
|
||||||
|
|
||||||
static const String imagesAppbarBack = 'assets/images/appbar_back.png';
|
static const String imagesBackIcon = 'assets/images/back_icon.png';
|
||||||
static const String imagesCopy = 'assets/images/copy.png';
|
static const String imagesCopy = 'assets/images/copy.png';
|
||||||
|
static const String imagesDailyQuoteBackground = 'assets/images/daily_quote_background.png';
|
||||||
static const String imagesDeleteIcon = 'assets/images/delete_icon.png';
|
static const String imagesDeleteIcon = 'assets/images/delete_icon.png';
|
||||||
static const String imagesDialog = 'assets/images/dialog.png';
|
|
||||||
static const String imagesFullScreen = 'assets/images/fullScreen.png';
|
static const String imagesFullScreen = 'assets/images/fullScreen.png';
|
||||||
static const String imagesHistory = 'assets/images/history.png';
|
static const String imagesHomeBackground = 'assets/images/home_background.png';
|
||||||
static const String imagesHomeBackground = 'assets/images/homeBackground.png';
|
static const String imagesHomeMore = 'assets/images/home_more.png';
|
||||||
static const String imagesHomeMore = 'assets/images/homeMore.png';
|
|
||||||
static const String imagesPhoto = 'assets/images/photo.png';
|
|
||||||
static const String imagesPoyline = 'assets/images/poyline.png';
|
static const String imagesPoyline = 'assets/images/poyline.png';
|
||||||
static const String imagesRabbitSayGood = 'assets/images/rabbitSayGood.png';
|
static const String imagesRabbitSayGood = 'assets/images/rabbit_say_good.png';
|
||||||
static const String imagesSpeakFace = 'assets/images/speak_face.png';
|
static const String imagesSpeakFace = 'assets/images/speak_face.png';
|
||||||
static const String imagesStar = 'assets/images/star.png';
|
static const String imagesStar = 'assets/images/star.png';
|
||||||
static const String imagesSwitchHomeIcon = 'assets/images/switch_home_icon.png';
|
static const String imagesSwitchHomeIcon = 'assets/images/switch_home_icon.png';
|
||||||
|
static const String imagesTitleBakcground = 'assets/images/title_bakcground.png';
|
||||||
static const String imagesToHomeBottom = 'assets/images/to_home_bottom.png';
|
static const String imagesToHomeBottom = 'assets/images/to_home_bottom.png';
|
||||||
|
static const String imagesToolsDialog = 'assets/images/tools_dialog.png';
|
||||||
|
static const String imagesToolsHistory = 'assets/images/tools_history.png';
|
||||||
|
static const String imagesToolsPhoto = 'assets/images/tools_photo.png';
|
||||||
static const String imagesTranslatorResultBackground = 'assets/images/translatorResultBackground.png';
|
static const String imagesTranslatorResultBackground = 'assets/images/translatorResultBackground.png';
|
||||||
static const String jsonLanguage = 'assets/json/language.json';
|
static const String jsonLanguage = 'assets/json/language.json';
|
||||||
static const String jsonTranslationScene = 'assets/json/translation_scene.json';
|
static const String jsonTranslationScene = 'assets/json/translation_scene.json';
|
||||||
@ -27,7 +29,6 @@ class Assets {
|
|||||||
static const String svgFaceVoice = 'assets/svg/face_voice.svg';
|
static const String svgFaceVoice = 'assets/svg/face_voice.svg';
|
||||||
static const String svgFamily = 'assets/svg/family.svg';
|
static const String svgFamily = 'assets/svg/family.svg';
|
||||||
static const String svgHealthy = 'assets/svg/healthy.svg';
|
static const String svgHealthy = 'assets/svg/healthy.svg';
|
||||||
static const String svgHomeMore = 'assets/svg/homeMore.svg';
|
|
||||||
static const String svgHomeRightIcon = 'assets/svg/home_right_icon.svg';
|
static const String svgHomeRightIcon = 'assets/svg/home_right_icon.svg';
|
||||||
static const String svgHomeVoice = 'assets/svg/homeVoice.svg';
|
static const String svgHomeVoice = 'assets/svg/homeVoice.svg';
|
||||||
static const String svgMakeFriends = 'assets/svg/make_friends.svg';
|
static const String svgMakeFriends = 'assets/svg/make_friends.svg';
|
||||||
|
|||||||
@ -15,7 +15,7 @@ class IndexView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Container(
|
body: Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage(Assets.imagesHomeBackground),
|
image: AssetImage(Assets.imagesHomeBackground),
|
||||||
@ -26,6 +26,7 @@ class IndexView extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_buildHead(),
|
_buildHead(),
|
||||||
|
const SizedBox(height: 30),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -50,29 +51,31 @@ class IndexView extends StatelessWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
Container(
|
||||||
"Courses",
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||||
style: TextStyle(
|
decoration: const BoxDecoration(
|
||||||
color: Color(0xff1E1E1E),
|
image: DecorationImage(
|
||||||
fontSize: 24,
|
image: AssetImage(
|
||||||
fontWeight: FontWeight.w700,
|
Assets.imagesTitleBakcground,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: const Text(
|
||||||
|
"Instant Translator",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff1E1E1E),
|
||||||
|
fontSize: 24,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: logic.openSettingsBottomSheet,
|
onTap: logic.openSettingsBottomSheet,
|
||||||
child: ClipOval(
|
child: ClipOval(
|
||||||
child: Container(
|
child: Image.asset(
|
||||||
|
Assets.imagesHomeMore,
|
||||||
width: 32,
|
width: 32,
|
||||||
height: 32,
|
height: 32,
|
||||||
color: const Color(0xff4ECA8C),
|
|
||||||
child: FittedBox(
|
|
||||||
fit: BoxFit.none,
|
|
||||||
child: SvgPicture.asset(
|
|
||||||
Assets.svgHomeMore,
|
|
||||||
width: 20,
|
|
||||||
height: 20,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -82,298 +85,335 @@ class IndexView extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildDailyQuote() {
|
Widget _buildDailyQuote() {
|
||||||
return Stack(
|
return Container(
|
||||||
children: [
|
decoration: BoxDecoration(
|
||||||
GestureDetector(
|
border: Border.all(
|
||||||
onTap: logic.toSceneCategory,
|
width: 1.5,
|
||||||
child: Column(
|
color: const Color(0xff3AAA72),
|
||||||
children: [
|
|
||||||
const SizedBox(height: 30),
|
|
||||||
Container(
|
|
||||||
height: 222,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border:
|
|
||||||
Border.all(width: 1.5, color: const Color(0xff3AAA72)),
|
|
||||||
color: const Color.fromARGB(213, 78, 202, 140),
|
|
||||||
borderRadius: BorderRadius.circular(16)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Positioned(
|
color: const Color(0xff78dfa8),
|
||||||
top: 46,
|
borderRadius: BorderRadius.circular(16),
|
||||||
left: 20,
|
),
|
||||||
child: GestureDetector(
|
child: Stack(
|
||||||
|
clipBehavior: Clip.none,
|
||||||
|
children: [
|
||||||
|
Positioned(
|
||||||
|
top: 16,
|
||||||
|
right: 31,
|
||||||
|
left: 31,
|
||||||
|
child: Image.asset(
|
||||||
|
Assets.imagesDailyQuoteBackground,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
onTap: logic.toSceneCategory,
|
onTap: logic.toSceneCategory,
|
||||||
child: Row(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
Container(
|
||||||
"Daily Quote",
|
padding: const EdgeInsets.symmetric(
|
||||||
style: TextStyle(
|
horizontal: 30,
|
||||||
fontSize: 20,
|
vertical: 15,
|
||||||
fontWeight: FontWeight.w800,
|
),
|
||||||
fontStyle: FontStyle.italic,
|
child: Stack(
|
||||||
color: Colors.white,
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 5),
|
||||||
|
child: SvgPicture.asset(Assets.svgHomeRightIcon),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Column(
|
||||||
padding: const EdgeInsets.only(left: 5),
|
children: [
|
||||||
child: SvgPicture.asset(Assets.svgHomeRightIcon),
|
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),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
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(
|
||||||
|
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: const Color.fromARGB(
|
||||||
|
78, 78, 202, 140),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(12)),
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.none,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets.svgSpeaker,
|
||||||
|
width: 16,
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
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(
|
||||||
|
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: const Color.fromARGB(
|
||||||
|
78, 78, 202, 140),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.none,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets.svgSpeaker,
|
||||||
|
width: 16,
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Positioned(
|
||||||
Positioned(
|
top: -22,
|
||||||
top: -4,
|
right: 5,
|
||||||
right: 24,
|
child: Image.asset(
|
||||||
child: Image.asset(
|
Assets.imagesRabbitSayGood,
|
||||||
Assets.imagesRabbitSayGood,
|
width: 137,
|
||||||
width: 90,
|
height: 115,
|
||||||
height: 90,
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
Column(
|
),
|
||||||
children: [
|
|
||||||
const SizedBox(
|
|
||||||
height: 85,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: double.infinity,
|
|
||||||
height: 168,
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(width: 1.5, color: const Color(0xff3AAA72)),
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
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(
|
|
||||||
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:
|
|
||||||
const Color.fromARGB(78, 78, 202, 140),
|
|
||||||
borderRadius: BorderRadius.circular(12)),
|
|
||||||
child: FittedBox(
|
|
||||||
fit: BoxFit.none,
|
|
||||||
child: SvgPicture.asset(
|
|
||||||
Assets.svgSpeaker,
|
|
||||||
width: 16,
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
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(
|
|
||||||
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: const Color.fromARGB(78, 78, 202, 140),
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
),
|
|
||||||
child: FittedBox(
|
|
||||||
fit: BoxFit.none,
|
|
||||||
child: SvgPicture.asset(
|
|
||||||
Assets.svgSpeaker,
|
|
||||||
width: 16,
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildTools() {
|
Widget _buildTools() {
|
||||||
return Row(
|
return Container(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
children: [
|
child: Row(
|
||||||
Column(
|
children: [
|
||||||
children: [
|
Column(
|
||||||
GestureDetector(
|
children: [
|
||||||
onTap: logic.toPhotos,
|
GestureDetector(
|
||||||
child: Container(
|
onTap: logic.toPhotos,
|
||||||
width: 72,
|
child: Container(
|
||||||
height: 72,
|
width: 72,
|
||||||
padding: const EdgeInsets.all(10),
|
height: 72,
|
||||||
decoration: BoxDecoration(
|
padding: const EdgeInsets.all(12),
|
||||||
color: const Color(0xffD2FFFB),
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(36),
|
color: const Color(0xffD2FFFB),
|
||||||
),
|
borderRadius: BorderRadius.circular(24),
|
||||||
child: Image.asset(
|
),
|
||||||
Assets.imagesPhoto,
|
child: Image.asset(
|
||||||
|
Assets.imagesToolsPhoto,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const Padding(
|
||||||
const Padding(
|
padding: EdgeInsets.only(top: 10),
|
||||||
padding: EdgeInsets.only(top: 10),
|
child: Text(
|
||||||
child: Text(
|
"Photo",
|
||||||
"Photo",
|
style: TextStyle(
|
||||||
style: TextStyle(
|
fontSize: 14,
|
||||||
fontSize: 14,
|
color: Colors.black,
|
||||||
color: Colors.black,
|
fontWeight: FontWeight.w500,
|
||||||
fontWeight: FontWeight.w500,
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Expanded(child: Container()),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: logic.toP2P,
|
||||||
|
child: Container(
|
||||||
|
width: 72,
|
||||||
|
height: 72,
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: const Color(0xffE1E2FE),
|
||||||
|
borderRadius: BorderRadius.circular(24),
|
||||||
|
),
|
||||||
|
child: Image.asset(
|
||||||
|
Assets.imagesToolsDialog,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
const Padding(
|
||||||
],
|
padding: EdgeInsets.only(top: 10),
|
||||||
),
|
child: Text(
|
||||||
Column(
|
"Face2face",
|
||||||
children: [
|
style: TextStyle(
|
||||||
GestureDetector(
|
fontSize: 14,
|
||||||
onTap: logic.toP2P,
|
color: Colors.black,
|
||||||
child: Container(
|
fontWeight: FontWeight.w500,
|
||||||
width: 72,
|
),
|
||||||
height: 72,
|
|
||||||
padding: const EdgeInsets.all(10),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: const Color(0xffE1E2FE),
|
|
||||||
borderRadius: BorderRadius.circular(36),
|
|
||||||
),
|
),
|
||||||
child: Image.asset(
|
)
|
||||||
Assets.imagesDialog,
|
],
|
||||||
|
),
|
||||||
|
Expanded(child: Container()),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: logic.toTranslateHistory,
|
||||||
|
child: Container(
|
||||||
|
width: 72,
|
||||||
|
height: 72,
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: const Color(0xffFEE5C5),
|
||||||
|
borderRadius: BorderRadius.circular(24),
|
||||||
|
),
|
||||||
|
child: Image.asset(
|
||||||
|
Assets.imagesToolsHistory,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const Padding(
|
||||||
const Padding(
|
padding: EdgeInsets.only(top: 10),
|
||||||
padding: EdgeInsets.only(top: 10),
|
child: Text(
|
||||||
child: Text(
|
"History",
|
||||||
"Face2face",
|
style: TextStyle(
|
||||||
style: TextStyle(
|
fontSize: 14,
|
||||||
fontSize: 14,
|
color: Colors.black,
|
||||||
color: Colors.black,
|
fontWeight: FontWeight.w500,
|
||||||
fontWeight: FontWeight.w500,
|
),
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
)
|
],
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
Column(
|
),
|
||||||
children: [
|
|
||||||
GestureDetector(
|
|
||||||
onTap: logic.toTranslateHistory,
|
|
||||||
child: Container(
|
|
||||||
width: 72,
|
|
||||||
height: 72,
|
|
||||||
padding: const EdgeInsets.all(10),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: const Color(0xffFEE5C5),
|
|
||||||
borderRadius: BorderRadius.circular(36),
|
|
||||||
),
|
|
||||||
child: Image.asset(
|
|
||||||
Assets.imagesHistory,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Padding(
|
|
||||||
padding: EdgeInsets.only(top: 10),
|
|
||||||
child: Text(
|
|
||||||
"History",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,20 +423,12 @@ class IndexView extends StatelessWidget {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: logic.toTranslate,
|
onTap: logic.toTranslate,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 76,
|
height: 91,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color.fromARGB(
|
color: const Color(0xff7678ef),
|
||||||
213,
|
borderRadius: BorderRadius.circular(28),
|
||||||
69,
|
border: Border.all(width: 1.5, color: const Color(0xff5153c0)),
|
||||||
168,
|
|
||||||
254,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(16),
|
|
||||||
border: Border.all(
|
|
||||||
width: 1.5,
|
|
||||||
color: const Color(0xff0087FF),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
@ -424,7 +456,7 @@ class IndexView extends StatelessWidget {
|
|||||||
width: 36,
|
width: 36,
|
||||||
padding: const EdgeInsets.all(5),
|
padding: const EdgeInsets.all(5),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xff8BCFFE),
|
color: const Color(0xff5153c0),
|
||||||
borderRadius: BorderRadius.circular(18),
|
borderRadius: BorderRadius.circular(18),
|
||||||
),
|
),
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(
|
||||||
@ -439,7 +471,6 @@ class IndexView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
const TLanguageBarWidget(),
|
const TLanguageBarWidget(),
|
||||||
const SizedBox(height: 20),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,7 +52,7 @@ class TBaseAppbarWidget extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
Assets.imagesAppbarBack,
|
Assets.imagesBackIcon,
|
||||||
width: 24,
|
width: 24,
|
||||||
height: 24,
|
height: 24,
|
||||||
color: backColor,
|
color: backColor,
|
||||||
|
|||||||