Wheel breaks when wrapped with FittedBox & SizedBox #87
Labels
closing in 2 weeks if no reply
in triage
question
Further information is requested
waiting for reply
Hi all,
i created a very simple flutter project (version 3.3.9, Picker version 3.0.2). when wrapping the Scaffold with a Fitted & Sized box as you see in the example code below, the touch points of the color wheel are broken (like in the video). Is there any way to fix this?
vlc-record-2024-05-15-12h21m07s-2024-05-15.12-18-28.mkv-.mp4
`
import 'package:flex_color_picker/flex_color_picker.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@OverRide
State createState() => _MyHomePageState();
}
class _MyHomePageState extends State {
Color currentColor = Colors.blue;
@OverRide
Widget build(BuildContext context) {
return FittedBox(
child: SizedBox(
width: 1920,
height: 1080,
child: Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: ColorPicker(
pickersEnabled: const <ColorPickerType, bool>{
ColorPickerType.wheel: true,
ColorPickerType.primary: false,
ColorPickerType.accent: false,
},
wheelDiameter: 500,
wheelSquarePadding: 50,
wheelWidth: 40,
wheelSquareBorderRadius: 16,
enableShadesSelection: false,
color: currentColor,
onColorChanged: (value) {
setState(() {
currentColor = value;
});
},
),
),
),
),
);
}
}
`
The text was updated successfully, but these errors were encountered: