Darken recording flow and increase voice requirement
All checks were successful
Build and deploy Flutter Web / build (push) Successful in 2m41s
All checks were successful
Build and deploy Flutter Web / build (push) Successful in 2m41s
This commit is contained in:
@@ -649,7 +649,7 @@ class AddExperienceFlow extends ConsumerStatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _AddExperienceFlowState extends ConsumerState<AddExperienceFlow> {
|
class _AddExperienceFlowState extends ConsumerState<AddExperienceFlow> {
|
||||||
static const _minimumInformationUnits = 8.0;
|
static const _minimumInformationUnits = 16.0;
|
||||||
static const _nearbyPlaceRadiusMeters = 200;
|
static const _nearbyPlaceRadiusMeters = 200;
|
||||||
|
|
||||||
final _api = MapflowApi();
|
final _api = MapflowApi();
|
||||||
@@ -829,12 +829,8 @@ class _AddExperienceFlowState extends ConsumerState<AddExperienceFlow> {
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
final isVoiceStep = _step == 1;
|
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: isVoiceStep
|
backgroundColor: const Color(0xFF05030B),
|
||||||
? const Color(0xFF05030B)
|
|
||||||
: const Color(0xFFF7F3EA),
|
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.fromLTRB(
|
padding: EdgeInsets.fromLTRB(
|
||||||
@@ -848,7 +844,7 @@ class _AddExperienceFlowState extends ConsumerState<AddExperienceFlow> {
|
|||||||
_StoryProgress(
|
_StoryProgress(
|
||||||
step: _step,
|
step: _step,
|
||||||
total: 3,
|
total: 3,
|
||||||
dark: isVoiceStep,
|
dark: true,
|
||||||
onClose: () => Navigator.of(context).pop(),
|
onClose: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 18),
|
const SizedBox(height: 18),
|
||||||
@@ -892,6 +888,7 @@ class _IntroStep extends StatelessWidget {
|
|||||||
'Поделись ощущением от места голосом. Мы разберем запись через AI и удалим аудио после обработки.',
|
'Поделись ощущением от места голосом. Мы разберем запись через AI и удалим аудио после обработки.',
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||||
|
color: Colors.white,
|
||||||
fontWeight: FontWeight.w800,
|
fontWeight: FontWeight.w800,
|
||||||
height: 1.18,
|
height: 1.18,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
@@ -926,6 +923,7 @@ class _PlaceStep extends StatelessWidget {
|
|||||||
'Выбери место рядом',
|
'Выбери место рядом',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
|
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
|
||||||
|
color: Colors.white,
|
||||||
fontWeight: FontWeight.w900,
|
fontWeight: FontWeight.w900,
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
),
|
),
|
||||||
@@ -936,11 +934,17 @@ class _PlaceStep extends StatelessWidget {
|
|||||||
future: placesFuture,
|
future: placesFuture,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState != ConnectionState.done) {
|
if (snapshot.connectionState != ConnectionState.done) {
|
||||||
return const Center(child: CircularProgressIndicator());
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(color: Color(0xFFFF2D75)),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (snapshot.hasError) {
|
if (snapshot.hasError) {
|
||||||
return const Center(
|
return const Center(
|
||||||
child: Icon(Icons.error_outline, size: 42),
|
child: Icon(
|
||||||
|
Icons.error_outline,
|
||||||
|
color: Colors.white,
|
||||||
|
size: 42,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -950,9 +954,16 @@ class _PlaceStep extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const Icon(Icons.location_off_outlined, size: 42),
|
const Icon(
|
||||||
|
Icons.location_off_outlined,
|
||||||
|
color: Colors.white,
|
||||||
|
size: 42,
|
||||||
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Text('Нет мест в $radiusMetersм'),
|
Text(
|
||||||
|
'Нет мест в $radiusMetersм',
|
||||||
|
style: const TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -1001,7 +1012,7 @@ class _NearbyPlaceCard extends StatelessWidget {
|
|||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
return Material(
|
return Material(
|
||||||
color: const Color(0xFFFFFBF5),
|
color: const Color(0xFF15111D),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: disabled ? null : onTap,
|
onTap: disabled ? null : onTap,
|
||||||
@@ -1014,7 +1025,7 @@ class _NearbyPlaceCard extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const Icon(Icons.place_outlined),
|
const Icon(Icons.place_outlined, color: Colors.white70),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -1022,6 +1033,7 @@ class _NearbyPlaceCard extends StatelessWidget {
|
|||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
fontWeight: FontWeight.w900,
|
fontWeight: FontWeight.w900,
|
||||||
height: 1.1,
|
height: 1.1,
|
||||||
),
|
),
|
||||||
@@ -1067,7 +1079,9 @@ class _PlaceTypeChip extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return DecoratedBox(
|
return DecoratedBox(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: primary ? const Color(0xFF111827) : const Color(0xFFECE5D8),
|
color: primary
|
||||||
|
? const Color(0xFFFF2D75)
|
||||||
|
: Colors.white.withValues(alpha: 0.12),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@@ -1075,7 +1089,7 @@ class _PlaceTypeChip extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
label,
|
label,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: primary ? Colors.white : const Color(0xFF3A332A),
|
color: primary ? Colors.white : const Color(0xFFECE7F0),
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
height: 1,
|
height: 1,
|
||||||
@@ -1159,8 +1173,8 @@ class _VoiceProgressGrid extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
const columns = 24;
|
const columns = 18;
|
||||||
const rows = 14;
|
const rows = 12;
|
||||||
const total = columns * rows;
|
const total = columns * rows;
|
||||||
final filled = (progress.clamp(0.0, 1.0) * total).round();
|
final filled = (progress.clamp(0.0, 1.0) * total).round();
|
||||||
|
|
||||||
@@ -1171,8 +1185,8 @@ class _VoiceProgressGrid extends StatelessWidget {
|
|||||||
(constraints.maxWidth - gap * (columns - 1)) / columns;
|
(constraints.maxWidth - gap * (columns - 1)) / columns;
|
||||||
final maxCellHeight = (constraints.maxHeight - gap * (rows - 1)) / rows;
|
final maxCellHeight = (constraints.maxHeight - gap * (rows - 1)) / rows;
|
||||||
final cellSize = math.max(
|
final cellSize = math.max(
|
||||||
6.0,
|
10.0,
|
||||||
math.min(maxCellWidth, maxCellHeight).clamp(5.0, 16.0),
|
math.min(maxCellWidth, maxCellHeight).clamp(10.0, 28.0),
|
||||||
);
|
);
|
||||||
final gridWidth = columns * cellSize + gap * (columns - 1);
|
final gridWidth = columns * cellSize + gap * (columns - 1);
|
||||||
final gridHeight = rows * cellSize + gap * (rows - 1);
|
final gridHeight = rows * cellSize + gap * (rows - 1);
|
||||||
@@ -1306,8 +1320,8 @@ class _VoiceRecordButtonState extends State<_VoiceRecordButton>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 220,
|
width: 280,
|
||||||
height: 220,
|
height: 280,
|
||||||
child: AnimatedBuilder(
|
child: AnimatedBuilder(
|
||||||
animation: _pulseController,
|
animation: _pulseController,
|
||||||
builder: (context, child) {
|
builder: (context, child) {
|
||||||
@@ -1323,8 +1337,8 @@ class _VoiceRecordButtonState extends State<_VoiceRecordButton>
|
|||||||
((pulse + offset) % 1) * (0.20 + level * 0.44) +
|
((pulse + offset) % 1) * (0.20 + level * 0.44) +
|
||||||
level * 0.16,
|
level * 0.16,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 150,
|
width: 190,
|
||||||
height: 150,
|
height: 190,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
@@ -1340,8 +1354,8 @@ class _VoiceRecordButtonState extends State<_VoiceRecordButton>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 174,
|
width: 216,
|
||||||
height: 174,
|
height: 216,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
value: widget.progress,
|
value: widget.progress,
|
||||||
strokeWidth: 8,
|
strokeWidth: 8,
|
||||||
@@ -1355,8 +1369,8 @@ class _VoiceRecordButtonState extends State<_VoiceRecordButton>
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 132,
|
width: 156,
|
||||||
height: 132,
|
height: 156,
|
||||||
child: FilledButton(
|
child: FilledButton(
|
||||||
onPressed: widget.enabled ? widget.onPressed : null,
|
onPressed: widget.enabled ? widget.onPressed : null,
|
||||||
style: FilledButton.styleFrom(
|
style: FilledButton.styleFrom(
|
||||||
@@ -1374,7 +1388,7 @@ class _VoiceRecordButtonState extends State<_VoiceRecordButton>
|
|||||||
: widget.isRecording
|
: widget.isRecording
|
||||||
? Icons.pause_rounded
|
? Icons.pause_rounded
|
||||||
: Icons.mic_rounded,
|
: Icons.mic_rounded,
|
||||||
size: 48,
|
size: 56,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user