Skip to content

Instantly share code, notes, and snippets.

@swavkulinski
Last active February 16, 2023 00:28
Show Gist options
  • Save swavkulinski/15868da151a078d09d01845ca30eceb5 to your computer and use it in GitHub Desktop.
Save swavkulinski/15868da151a078d09d01845ca30eceb5 to your computer and use it in GitHub Desktop.
Abstract methods, nullable, non nullable and default parameters
main (){}
abstract class A {
void listen({
bool isOk,
required String isBad,
});
}
class A1 extends A {
@override
void listen({bool? isOk, String? isBad}) {}
}
class A2 extends A {
@override
void listen({bool isOk = true, String isBad = "Really Bad"}) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment