ybq / Android-SpinKit

Android loading animations

Home Page:https://ybq.github.io/Android-SpinKit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to clear background color

arshadsk5 opened this issue · comments

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.

@arshadsk5 I had same issue.

getWindow().setBackgroundDrawableResource(android.R.color.transparent);

this works for me

@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,
        ),
      ),
    );
  }
}