mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-24 11:17:55 +00:00
55 lines
1.8 KiB
Dart
55 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
|
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
|
|
|
class WeatherBottomSheet extends StatelessWidget {
|
|
final VoidCallback showTemperatureDialog;
|
|
final VoidCallback showHumidityDialog;
|
|
final VoidCallback showWeatherDialog;
|
|
final VoidCallback showWindSpeedDialog;
|
|
|
|
const WeatherBottomSheet({
|
|
Key? key,
|
|
required this.showTemperatureDialog,
|
|
required this.showHumidityDialog,
|
|
required this.showWeatherDialog,
|
|
required this.showWindSpeedDialog,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
const Center(
|
|
child: Text(
|
|
"When Weather Changes",
|
|
style: TextStyle(
|
|
fontSize: 16.0,
|
|
fontWeight: FontWeight.w700,
|
|
color: Colors.blue),
|
|
),
|
|
),
|
|
const Divider(color: ColorsManager.greyColor),
|
|
_buildWeatherOption(context, 'Temperature', showTemperatureDialog),
|
|
_buildWeatherOption(context, 'Humidity', showHumidityDialog),
|
|
_buildWeatherOption(context, 'Weather', showWeatherDialog),
|
|
_buildWeatherOption(
|
|
context, 'Wind Speed', showWindSpeedDialog),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildWeatherOption(
|
|
BuildContext context, String title, VoidCallback onTap) {
|
|
return ListTile(
|
|
title: BodyMedium(text: title, fontSize: 15, fontWeight: FontWeight.w400),
|
|
trailing: const Icon(Icons.chevron_right, color: ColorsManager.textGray),
|
|
onTap: onTap,
|
|
);
|
|
}
|
|
}
|