Skip to content

Instantly share code, notes, and snippets.

@sbis04
Created February 17, 2021 01:31
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 sbis04/a1c5802cb74bccb0f90f87843adf3348 to your computer and use it in GitHub Desktop.
Save sbis04/a1c5802cb74bccb0f90f87843adf3348 to your computer and use it in GitHub Desktop.
Stack(
children: [
AspectRatio(
aspectRatio: 16 / 9,
child: Container(
color: Colors.black,
width: double.maxFinite,
child: Center(
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(
CustomColors.muxPink,
),
strokeWidth: 2,
),
),
),
),
_controller.value.initialized
? AspectRatio(
aspectRatio: _controller.value.aspectRatio,
child: VideoPlayer(_controller),
)
: AspectRatio(
aspectRatio: 16 / 9,
child: Container(
color: Colors.black,
width: double.maxFinite,
child: Center(
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(
CustomColors.muxPink,
),
strokeWidth: 2,
),
),
),
),
],
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment