Skip to content

Instantly share code, notes, and snippets.

@HansMuller
Created March 22, 2022 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HansMuller/d6388e7747a442b82950653e48d7e851 to your computer and use it in GitHub Desktop.
Save HansMuller/d6388e7747a442b82950653e48d7e851 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
class _MaterialStatePropertyAll<T> implements MaterialStateProperty<T> {
const _MaterialStatePropertyAll(this.value);
final T value;
@override
T resolve(Set<MaterialState> states) => value;
@override
String toString() => 'MaterialStateProperty.all($value)';
}
void main() {
print(const _MaterialStatePropertyAll<String>('foo'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment