5

I need to implement time picker as a widget . I don't need it in modal or dialogue . I need it to be shown in container .any resources or guidlines are appreciated.enter image description here

2

1 Answer 1

6

You can get something similar using a CupertinoTimePicker.

return Scaffold(
      body: Center(
        child: Container(
          height: 200,
          child: Card(
            elevation: 4,
            child: Row(
              children: <Widget>[
                SizedBox(
                  width: 100,
                  child: Text("Select a time"),
                ),
                Expanded(
                  child: CupertinoTimerPicker(
                    mode: CupertinoTimerPickerMode.hm,
                    onTimerDurationChanged: (data) {},
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );

result:

enter image description here

1
  • import for retrieving CupertinoTimerPicker is import 'package:flutter/cupertino.dart';
    – gsm
    Feb 25, 2021 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.