I am creating a StatefulWidget which have a transparent background. Code for same is:
return Scaffold(
body: Builder(
builder: (context) => Material(
color: Colors.black.withOpacity(0.75),
child: new SafeArea(
child: Center(
child: Container(
color: Colors.white,
child: ListView(
children: <Widget>[
resetPasswordLabel,
inputFields,
doneButton(context),
],
),
height: 250.0,
margin: EdgeInsets.only(left: 20.0, right: 20.0),
),
),
),
),
),
);
Problem: When I am opening this widget using Navigator the transparent color is visible for 1 - 2 seconds and after it turns to the black background.
Please assist me here.