From 0b4e441e4d87cbc427257957c5c8db04aa99d9ac Mon Sep 17 00:00:00 2001 From: Donghyun Kim Date: Wed, 18 Sep 2024 19:26:05 +0900 Subject: [PATCH] Reformat code --- flutter_package/example/lib/main.dart | 53 ++++++++++++++------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/flutter_package/example/lib/main.dart b/flutter_package/example/lib/main.dart index a5ea5dee..ad836889 100644 --- a/flutter_package/example/lib/main.dart +++ b/flutter_package/example/lib/main.dart @@ -88,39 +88,40 @@ class MyColumn extends StatelessWidget { // `StreamBuilder` listens to a stream // and rebuilds the widget accordingly. StreamBuilder( - stream: SampleFractal.rustSignalStream, - builder: (context, snapshot) { - final rustSignal = snapshot.data; - if (rustSignal == null) { - return Container( - margin: const EdgeInsets.all(20), - width: 256, - height: 256, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(24.0), - color: Colors.black, - ), - ); - } - final imageData = rustSignal.binary; + stream: SampleFractal.rustSignalStream, + builder: (context, snapshot) { + final rustSignal = snapshot.data; + if (rustSignal == null) { return Container( margin: const EdgeInsets.all(20), width: 256, height: 256, - child: ClipRRect( + decoration: BoxDecoration( borderRadius: BorderRadius.circular(24.0), - child: FittedBox( - fit: BoxFit.contain, - child: Image.memory( - imageData, - width: 256, - height: 256, - gaplessPlayback: true, - ), - ), + color: Colors.black, ), ); - }), + } + final imageData = rustSignal.binary; + return Container( + margin: const EdgeInsets.all(20), + width: 256, + height: 256, + child: ClipRRect( + borderRadius: BorderRadius.circular(24.0), + child: FittedBox( + fit: BoxFit.contain, + child: Image.memory( + imageData, + width: 256, + height: 256, + gaplessPlayback: true, + ), + ), + ), + ); + }, + ), StreamBuilder( // This stream is generated from a marked Protobuf message. stream: SampleNumberOutput.rustSignalStream,