0

I am using a flutter plugin called flutter_cupertino_datetime_picker and I want to modify the wheel to remove the curvature of the numbers (screenshot) and display it without transformation.

Now

enter image description here

Desired

enter image description here

By default it shows like the second screenshot but I have been modifying the plugin core to show custom, but the wheel shows like this

The widget is:

          Container(
                margin: EdgeInsets.only(top: 8.0, bottom: 40.0),
                child: DateTimePickerWidget(
                  dateFormatSeparator: ':',
                  minDateTime: DateTime.parse(MIN_DATETIME),
                  maxDateTime: DateTime.parse(MAX_DATETIME),
                  initDateTime: DateTime.now(),
                  dateFormat: DATE_FORMAT,
                  minuteDivider: 1,
                  pickerTheme: const DateTimePickerTheme(
                      showTitle: false,
                      itemTextStyle: TextStyle(
                          fontWeight: FontWeight.w700,
                          fontSize: 16,
                          fontFamily: Fonts.satoshi),
                      backgroundColor: AmbarColors.contentInverse),
                  onChange: (dateTime, selectedIndex) {
                    setState(() {
                      _dateTime = dateTime;
                    });
                  },
                ),
              ),
rafa_pe
  • 155
  • 1
  • 4
  • 15

1 Answers1

1

If you dont provide that constants to us we cant reproduce your code.

but for now i tried that package and it seems related to date format on default its how you desired. So your problem relies on date format.

class _DemoWidget extends StatefulWidget {
  const _DemoWidget();

  @override
  State<_DemoWidget> createState() => __DemoWidgetState();
}

class __DemoWidgetState extends State<_DemoWidget> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: const CupertinoNavigationBar(
        middle: Text('InheritedWidget Demo'),
      ),
      body: Container(
        child: DateTimePickerWidget(
          dateFormatSeparator: ":",
        ),
      ),
    );
  }
}

And i didnt see any handle to configure that problem in constructor.

Mehmet Karanlık
  • 237
  • 1
  • 10