changing ac bloc

This commit is contained in:
ashrafzarkanisala
2024-08-26 00:48:29 +03:00
parent d7e3c1e1d0
commit d94ec25003
23 changed files with 780 additions and 185 deletions

View File

@ -0,0 +1,17 @@
import 'package:flutter/material.dart';
class CelsiusSymbol extends StatelessWidget {
const CelsiusSymbol({this.color, super.key});
final Color? color;
@override
Widget build(BuildContext context) {
return Text(
'°C',
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: color,
),
);
}
}

View File

@ -44,7 +44,7 @@ class DeviceControlDialog extends StatelessWidget with RouteControlsBasedCode {
const SizedBox(height: 20),
//// BUILD DEVICE CONTROLS
///
//// ROUTE TO SPECIFIC CONTROL VIEW BASED ON DEVICE CATEGORY
//// ROUTE TO SPECIFIC CONTROL VIEW BASED ON DEVICE CATEGORY
routeControlsWidgets(device: device),
],
),
@ -56,7 +56,7 @@ class DeviceControlDialog extends StatelessWidget with RouteControlsBasedCode {
Widget _buildDeviceInfoSection() {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 40, horizontal: 50),
padding: const EdgeInsets.symmetric(vertical: 50, horizontal: 50),
child: Table(
children: [
TableRow(

View File

@ -6,6 +6,7 @@ class IncrementDecrementWidget extends StatelessWidget {
final String description;
final VoidCallback onIncrement;
final VoidCallback onDecrement;
final Color? descriptionColor;
const IncrementDecrementWidget({
super.key,
@ -13,6 +14,7 @@ class IncrementDecrementWidget extends StatelessWidget {
required this.description,
required this.onIncrement,
required this.onDecrement,
this.descriptionColor,
});
@override
@ -22,18 +24,20 @@ class IncrementDecrementWidget extends StatelessWidget {
children: [
Material(
type: MaterialType.transparency,
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: InkWell(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: onDecrement,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.remove,
color: ColorsManager.greyColor,
size: 32,
child: Flexible(
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: InkWell(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: onDecrement,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.remove,
color: ColorsManager.greyColor,
size: 28,
),
),
),
),
@ -53,9 +57,9 @@ class IncrementDecrementWidget extends StatelessWidget {
),
TextSpan(
text: description,
style: const TextStyle(
style: TextStyle(
fontSize: 12,
color: ColorsManager.blackColor,
color: descriptionColor ?? ColorsManager.blackColor,
fontWeight: FontWeight.bold,
),
),
@ -64,18 +68,20 @@ class IncrementDecrementWidget extends StatelessWidget {
),
Material(
type: MaterialType.transparency,
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: InkWell(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: onIncrement,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.add,
color: ColorsManager.greyColor,
size: 32,
child: Flexible(
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: InkWell(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: onIncrement,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.add,
color: ColorsManager.greyColor,
size: 28,
),
),
),
),