“Mobil ilovalarni ishlab chiqish” fanidan


Download 1.58 Mb.
bet7/9
Sana14.04.2023
Hajmi1.58 Mb.
#1358106
1   2   3   4   5   6   7   8   9
Bog'liq
1-lab mobil

;
},
),
),
);
}
}

import 'package:flutter/material.dart';


import 'package:weather_app/helpers/extensions/string_extensions.dart';

import '../../data/models/weather.dart';

class CityPart extends StatelessWidget {
const CityPart({
Key? key,
required this.weather,
}) : super(key: key);

final Weather weather;

@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
weather.city.capitalizeString(),
style: const TextStyle(
color: Colors.white,
fontSize: 40,
fontWeight: FontWeight.bold,
),
),
Text(
weather.description,
style: const TextStyle(
color: Colors.white,
fontSize: 18,
),
),
],
);
}
}

import 'package:flutter/material.dart';


import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:weather_app/data/models/weather.dart';
import 'package:weather_app/logic/cubits/settings/settings_cubit.dart';

class Temperature extends StatefulWidget {
const Temperature({
Key? key,
required this.weather,
}) : super(key: key);

final Weather weather;

@override
State createState() => _TemperatureState();
}

class _TemperatureState extends State {


String _showTemperature(double temp) {
final tempUnit = context.watch().state.tempUnit;

if (tempUnit == TempUnits.fahrenheit) {
return '${((temp *

Download 1.58 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling