;
},
),
),
);
}
}
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 *
Dostları ilə paylaş: |