feat(video_calls, welcome_screen): ios mic fix, welcome scrin layoute fix

This commit is contained in:
misha
2026-09-28 11:20:52 +03:00
parent ae4f9d2e9b
commit 2dce28b196
17 changed files with 3303 additions and 1537 deletions

View File

@@ -44,82 +44,112 @@ class _WelcomeScreenState extends State<WelcomeScreen> {
),
Positioned.fill(
child: SafeArea(
child: Padding(
padding: const EdgeInsets.only(bottom: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox(height: 80),
SvgPicture.asset('assets/images/logo_welcome.svg'),
const Spacer(),
Padding(
padding: const EdgeInsets.all(16),
child: Material(
borderRadius: BorderRadius.circular(14),
color: Colors.white,
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 16),
const Text(
'Добро пожаловать!',
style: TextStyle(
fontSize: 28,
fontWeight: FontWeight.w800,
height: 1,
),
),
const SizedBox(height: 20),
const Text(
'Это первая версия приложения,\nи мы активно работаем над его\nулучшением. Если вы заметите ошибку\nили у вас есть идея — пожалуйста,\nсообщите нам!\n\nВаша помощь бесценна',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
height: 1.15,
),
),
const SizedBox(height: 24),
InkWell(
key: AppKeys.welcomeScreenButton,
onTap: () async {
final sharedPreferences = sl<Prefs>();
await sharedPreferences.setBool(PrefsKeys.welcomeScreenWasShowed, true);
if (await TokenStorage.haveTokenInStorage()) {
goRouter.go('/feed-screen');
} else {
goRouter.go('/auth-screen');
}
},
borderRadius: BorderRadius.circular(8),
child: Ink(
height: 52,
decoration: BoxDecoration(
color: appTheme.blueA400,
borderRadius: BorderRadius.circular(8),
),
child: const Center(
child: Text(
'Начать пользоваться',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
height: 1,
color: Colors.white,
child: LayoutBuilder(
builder: (context, constraints) {
final textScale = MediaQuery.textScalerOf(context).scale(1);
final topGap = textScale > 1.2 ? 24.0 : 80.0;
return SingleChildScrollView(
padding: const EdgeInsets.only(bottom: 16),
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: constraints.maxHeight - 16,
),
child: IntrinsicHeight(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: topGap),
SvgPicture.asset('assets/images/logo_welcome.svg'),
const Spacer(),
Padding(
padding: const EdgeInsets.all(16),
child: Material(
borderRadius: BorderRadius.circular(14),
color: Colors.white,
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
const SizedBox(height: 16),
const Text(
'Добро пожаловать!',
style: TextStyle(
fontSize: 28,
fontWeight: FontWeight.w800,
height: 1,
),
),
),
const SizedBox(height: 20),
const Text(
'Это первая версия приложения,\nи мы активно работаем над его\nулучшением. Если вы заметите ошибку\nили у вас есть идея — пожалуйста,\nсообщите нам!\n\nВаша помощь бесценна',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
height: 1.15,
),
),
const SizedBox(height: 24),
InkWell(
key: AppKeys.welcomeScreenButton,
onTap: () async {
final sharedPreferences = sl<Prefs>();
await sharedPreferences.setBool(
PrefsKeys.welcomeScreenWasShowed,
true,
);
if (await TokenStorage.haveTokenInStorage()) {
goRouter.go('/feed-screen');
} else {
goRouter.go('/auth-screen');
}
},
borderRadius: BorderRadius.circular(8),
child: Ink(
decoration: BoxDecoration(
color: appTheme.blueA400,
borderRadius: BorderRadius.circular(
8,
),
),
child: ConstrainedBox(
constraints: const BoxConstraints(
minHeight: 52,
),
child: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 16,
vertical: 14,
),
child: Center(
child: Text(
'Начать пользоваться',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
height: 1,
color: Colors.white,
),
),
),
),
),
),
),
const SizedBox(height: 16),
],
),
),
),
const SizedBox(height: 16),
],
),
),
],
),
),
),
],
),
);
},
),
),
),