fix
This commit is contained in:
@@ -2,18 +2,22 @@ import 'package:flutter/material.dart';
|
||||
import 'scooter_info_item.dart';
|
||||
|
||||
class ScooterInfoSection extends StatelessWidget {
|
||||
const ScooterInfoSection({super.key});
|
||||
final double distance;
|
||||
final String location;
|
||||
const ScooterInfoSection({super.key, required this.distance, required this.location});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: const [
|
||||
children: [
|
||||
ScooterInfoItem(icon: 'assets/icons/bolt.png', text: '47 км или 4 часа 17 минут'),
|
||||
ScooterInfoItem(icon: 'assets/icons/speed.png', text: 'max = 25 км/ч'),
|
||||
ScooterInfoItem(icon: 'assets/icons/location.png', text: 'пр. Московский, 33'),
|
||||
ScooterInfoItem(icon: 'assets/icons/location.png', text: location),
|
||||
Row(
|
||||
children: [
|
||||
ScooterInfoItem(icon: 'assets/icons/person.png', text: '120 м'),
|
||||
ScooterInfoItem(icon: 'assets/icons/person.png', text: distance.toInt() >= 1000
|
||||
? '${((distance.toInt()) / 1000).toStringAsFixed(1)} km'
|
||||
: '${distance.toInt()} m',),
|
||||
SizedBox(width: 16),
|
||||
ScooterInfoItem(icon: 'assets/icons/time.png', text: '1 минута'),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user