예제 #1
0
 public override void didChangeDependencies() {
     base.didChangeDependencies();
     string code =
         new ExampleCodeParser().getExampleCode(this.widget.exampleCodeTag, DefaultAssetBundle.of(this.context));
     if (this.mounted) {
         this.setState(() => { this._exampleCode = code; });
     }
 }
예제 #2
0
 public static ImageConfiguration createLocalImageConfiguration(BuildContext context, Size size = null)
 {
     return(new ImageConfiguration(
                DefaultAssetBundle.of(context: context),
                MediaQuery.of(context: context, true)?.devicePixelRatio ?? 1.0f,
                Localizations.localeOf(context: context, true),
                size: size,
                platform: Application.platform
                ));
 }