This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a seriously long hint. Like, super-duper long. | |
This is a seriously long hint. Like, super-duper long. | |
This is a seriously long hint. Like, super-duper long. | |
This is a seriously long hint. Like, super-duper long. | |
This is a seriously long hint. Like, super-duper long. | |
This is a seriously long hint. Like, super-duper long. | |
This is a seriously long hint. Like, super-duper long. | |
This is a seriously long hint. Like, super-duper long. | |
This is a seriously long hint. Like, super-duper long. | |
This is a seriously long hint. Like, super-duper long. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
//Import the font package | |
import 'package:google_fonts/google_fonts.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
class DiscData { | |
static final _rng = Random(); | |
double size; | |
Color color; | |
Alignment alignment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Promotion works with exceptions as well | |
// as return statements. Try a null check | |
// that throws an `Exception` instead of | |
// returning zero. | |
int getLength(String? str) { | |
// Try throwing here if `str` is null. | |
return str.length; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you'd like to assign a nullable expression | |
// to a variable that's non-nullable, you can use | |
// the assertion operator (the exclamation point: | |
// `!`). By adding `!` just after the expression, | |
// you tell Dart that the value won't be null, | |
// and it's safe to assign to a non-nullable | |
// variable. | |
// | |
// Note: if you're wrong, an exception will be | |
// thrown! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_web/material.dart'; | |
import 'package:flutter_web_ui/ui.dart' as ui; | |
void main() async { | |
await ui.webOnlyInitializePlatform(); | |
final numbers = FibonacciNumbers(); | |
runApp( | |
MaterialApp( | |
home: Scaffold( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2019 the Dart project authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license | |
// that can be found in the LICENSE file. | |
import 'dart:math' as math; | |
import 'package:flutter/material.dart'; | |
final Color primaryColor = Colors.orange; | |
final TargetPlatform platform = TargetPlatform.android; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass { | |
int? anInt; | |
} | |
class MyOtherClass extends MyClass { | |
int count = 0; | |
int? get anInt { | |
count++; | |
return count % 2 == 1 ? 1 : null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class C { | |
abstract int x1; | |
abstract var y1; | |
abstract final z; | |
abstract final int u1; | |
abstract covariant int v1; | |
abstract covariant var w; | |
} | |
class D extends C { |
NewerOlder