Question: I'm trying to create button like this.

[![enter image description here](https://i.stack.imgur.com/15Pp7.png)](https://i.stack.imgur.com/15Pp7.png)

The below is the flat button code. But I'm not getting the desired result.

```
FlatButton(
            padding: EdgeInsets.all(15),
            color: Colors.orange,
            textColor: Colors.white,
            child: Text(
              'NEXT',
              style: TextStyle(
                fontSize: 18,
                fontWeight: FontWeight.bold,
              ),
            ),
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)),
            onPressed: () => _nextButtonTapped,
          )

```

How can I set two colors in the background of the flat button?

Answer: 
You have an `ErrorInterceptor` which reloads when there is 401.You said there is some authentication issue in post service, see if it returns 401 then your `ErrorInterceptor` causes page to reload again and again.

```
 if (err.status === 401) {
            // auto logout if 401 response returned from api
            // this.authenticationService.logout();
            location.reload(true);
 }

```

you can navigate to login page when you get 401 `this.router.navigate(['/login']);`
Instead of location.reload(true) Put following in your ErrorInterceptor 

```
 if (err.status === 401) {
            this.router.navigate(['/home']);
 }

```