ToneSnap_FSX_Flutter/lib/modules/voice/about/about_view.dart
fengshengxiong 422a3f8802 first commit
2024-06-11 11:53:38 +08:00

63 lines
1.9 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:tone_snap/components/navigation_bar/base_appbar.dart';
import 'package:tone_snap/generated/assets.dart';
import 'package:tone_snap/modules/voice/about/about_controller.dart';
import 'package:tone_snap/res/values/strings.dart';
class AboutView extends StatelessWidget {
AboutView({super.key});
final controller = Get.find<AboutController>();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const BaseAppBar('About'),
body: Container(
alignment: Alignment.topCenter,
child: Column(
children: [
SizedBox(height: 60.h),
Image.asset(
Assets.iconAppIcon,
width: 120.w,
height: 120.w,
),
SizedBox(height: 20.h),
Obx(() {
return RichText(
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
text: TextSpan(
text: appName,
style: TextStyle(
color: Colors.white,
fontSize: 22.sp,
fontWeight: FontWeight.w600,
),
children: [
TextSpan(
text: '\n${controller.versionName.value}',
style: TextStyle(
color: Colors.white,
fontSize: 12.sp,
fontWeight: FontWeight.w600,
),
),
WidgetSpan(
child: SizedBox(height: 20.h),
),
],
),
);
}),
],
),
),
);
}
}