Skip to content

Instantly share code, notes, and snippets.

@dariadobsai
Last active February 10, 2021 23:22
Show Gist options
  • Select an option

  • Save dariadobsai/3f6b2a5d2e9c6dc284c5d91f37a66d7f to your computer and use it in GitHub Desktop.

Select an option

Save dariadobsai/3f6b2a5d2e9c6dc284c5d91f37a66d7f to your computer and use it in GitHub Desktop.

Revisions

  1. dariadobsai revised this gist Feb 10, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion home_page.dart
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    Widget _openPopupMenu() => PopupMenuButton<int>(
    onSelected: (value) {
    setState(() {
    value == 1 ? isPresentTime = true : isPresentTime = false;
    value == 1 ? isPresentTime = true : isPresentTime = false; // shorter form: isPresent = value == 1;
    });
    },
    itemBuilder: (context) => [
  2. dariadobsai created this gist Feb 10, 2021.
    15 changes: 15 additions & 0 deletions home_page.dart
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    Widget _openPopupMenu() => PopupMenuButton<int>(
    onSelected: (value) {
    setState(() {
    value == 1 ? isPresentTime = true : isPresentTime = false;
    });
    },
    itemBuilder: (context) => [
    ...
    ],
    icon: Container(
    ...
    ),
    ...
    ),
    );