how to clear background color
arshadsk5 opened this issue · comments
arshadsk5 commented
Hi when the loader is displayed , the whole screen is in white color, how do i remove that color and my app screen should be visible in background.
Please help thanks in advance.
Yuki Matsushita commented
@arshadsk5 I had same issue.
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
this works for me
Ajini Perera commented
@arshadsk5 I had same issue.
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
this works for me
Where should insert it into in the following code? Thanks!
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:green_pedals/constants.dart';
class Loading extends StatelessWidget {
//const Loading({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
return Container(
child: Center(
child: SpinKitDoubleBounce(
color: kPrimaryLightColor,
size: 40.0,
),
),
);
}
}