“Mobil ilovalarni ishlab chiqish” fanidan



Yüklə 1,58 Mb.
səhifə7/9
tarix17.06.2023
ölçüsü1,58 Mb.
#132099
1   2   3   4   5   6   7   8   9
“Mobil ilovalarni ishlab chiqish” fanidan

;
},
),
),
);
}
}

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 *

Yüklə 1,58 Mb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin