koukibadr / Bottom-Picker

https://pub.dev/packages/bottom_picker
MIT License
32 stars 21 forks source link

Formatting datepicker #83

Open amrutavarsh opened 10 months ago

amrutavarsh commented 10 months ago

Not sure if this is a bug or an error in my implementation but i'm unable to correctly format the datepicker. Attaching my current code and view

BottomPicker.date(
    title: 'Date of birth',
    dateOrder: DatePickerDateOrder.dmy,
    initialDateTime: dateOfBirth,
    maxDateTime: DateTime.now(),
    minDateTime: DateTime(1923),
    titleStyle: TextStyle(
      fontWeight: FontWeight.bold,
      fontSize: 16,
      color: Color(0xFF4202A6), // Assuming this is the title color
      letterSpacing: -0.3,
    ),
    titlePadding: EdgeInsets.only(top: 15), // Adjust padding to align the title with the close button
    onChange: (index) {
      HapticFeedback.lightImpact();
    },
    onSubmit: (index) {
      print("DATE");
      print(index);
      dateOfBirth = DateFormat('dd MMM yyyy').format(index);
      _submitForm();
    },
    pickerTextStyle: TextStyle(
      color: Colors.black,
      fontSize: 18,
      letterSpacing: -0.3,
    ),
    buttonText: 'Confirm',
    buttonTextStyle: TextStyle(
      color: Colors.white,
      fontWeight: FontWeight.w600,
      letterSpacing: -0.2,
    ),
    buttonSingleColor: Color(0xFF4202A6),
    displayButtonIcon: false,
    buttonPadding: 10,
    dismissable: true,
    height: 350,
).show(context);
Screenshot 2023-12-03 at 2 51 46 PM

I want to make the following changes:

  1. The Title and close button don't seem to be aligned
  2. Not able to change the grey color selected area to a lighter color
  3. There is some unnecessary space between the title and picker
  4. The picker doesn't extend all the way to the edges

Thanks!

tiltmaster commented 6 days ago

is this even fixed? its still not possible with dateTime

koukibadr commented 6 days ago

@tiltmaster still not fixed I'll work on it and let you know