Untitled

 avatar
unknown
plain_text
3 years ago
1.6 kB
7
Indexable
DraggableScrollableSheet(
        initialChildSize: 0.6,
        maxChildSize: 0.8,
        minChildSize: 0.5,
        builder: (_, controller) => Container(
          decoration: BoxDecoration(
              color: Colors.white,
              borderRadius: BorderRadius.vertical(top: Radius.circular(20))),
          padding: const EdgeInsets.all(16),
          child: ListView(
            controller: controller,
            children: [
              Row(
                mainAxisAlignment: MainAxisAlignment.end,
                children: [
                  IconButton(
                    onPressed: () {
                      Navigator.of(navigatorKey.currentState!.overlay!.context)
                          .pop();
                    },
                    icon: Icon(
                      Icons.close_rounded,
                      color: Colors.grey,
                    ),
                  ),
                ],
              ),
              ElevatedButton(
                  style: ElevatedButton.styleFrom(
                      shape: StadiumBorder(),
                      backgroundColor: Palette.primaryColor),
                  onPressed: () async {
                    await showMonthYearPicker(
                      context: navigatorKey.currentState!.overlay!.context,
                      initialDate: DateTime.now(),
                      firstDate: DateTime(2019),
                      lastDate: DateTime.now(),
                    );
                  },
                  child: Center(child: Text('Choisir mois'))),
            ],
          ),
        ),
      ),
Editor is loading...