Skip to content

Instantly share code, notes, and snippets.

@ThinkDigitalSoftware
Last active May 22, 2020 00:00
Show Gist options
  • Select an option

  • Save ThinkDigitalSoftware/383422fa45ce6657d6ec7109938a850f to your computer and use it in GitHub Desktop.

Select an option

Save ThinkDigitalSoftware/383422fa45ce6657d6ec7109938a850f to your computer and use it in GitHub Desktop.

Revisions

  1. ThinkDigitalSoftware revised this gist May 22, 2020. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions main.dart
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    void main() {
    var s1 = S();
    print(s1?.num ?? 0 > 1);
    var s2 = S()..num = 1.0;
    print(s2?.num ?? 0 > 1);
    }
    void main() {
    var s1 = S();
    print(s1?.num ?? 0 > 1);
    var s2 = S()..num = 1.0;
    print(s2?.num ?? 0 > 1);
    }

    class S {
    double num;
    }
    class S {
    double num;
    }
  2. ThinkDigitalSoftware created this gist May 21, 2020.
    10 changes: 10 additions & 0 deletions main.dart
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    void main() {
    var s1 = S();
    print(s1?.num ?? 0 > 1);
    var s2 = S()..num = 1.0;
    print(s2?.num ?? 0 > 1);
    }

    class S {
    double num;
    }