Untitled

asdsa
mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.3 kB
1
Indexable
Never
PopupMenuButton(
                  icon: Icon(Icons.sort),
                  onSelected: (String str) {
                    setState(() {
                      _selectedValue = str;
                    });
                  },
                  itemBuilder: (BuildContext context) {
                    return <PopupMenuEntry<String>>[
                      PopupMenuItem(
                        child: Row(
                          children: [
                            Icon(Icons.sort_by_alpha),
                            Padding(
                                padding: EdgeInsets.only(left: 12.0),
                                child: Text('Alfabetik Sıralama'))
                          ],
                        ),
                        value: 'title',
                      ),
                      PopupMenuItem(
                        child: Row(
                          children: [
                            Icon(Icons.star_half),
                            Padding(
                                padding: EdgeInsets.only(left: 12.0),
                                child: Text('Puan ile Sıralama'))
                          ],
                        ),
                        value: 'rating',
                      ),
                    ];
                  },
                )