Answers for "how to change background color in flutter theme"

3

how to give your app background colour in flutter

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Welcome to Flutter',
      home: Scaffold(
        backgroundColor: Color(0xff00BCD1),
        appBar: AppBar(
          title: Text('Flutter Screen Background Color Example'),
        ),
        body: Center(child: Body()),
      ),
    );
  }
}

/// This is the stateless widget that the main application instantiates.
class Body extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Text('How Are You?');
  }
}
Posted by: Guest on August-21-2020
2

change icon color flutter

Icon(
  Icons.widgets,
  color: Colors.blue.shade400,
)
Posted by: Guest on December-01-2020
1

how to change background color in flutter theme

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        canvasColor: Colors.green,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text('Changing background color using theme'),
        ),
        body: Container(
        	child: Center(
            	child: Text('Some widget goes here.')
            )
        ),
      ),
    );
  }
}
Posted by: Guest on December-31-2020
0

flutter scaffold background color

import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
  @override
    Widget build(BuildContext context) {

      return new MaterialApp(
        title: 'Testing',
        home: new Scaffold(
        //Here you can set what ever background color you need.
          backgroundColor: Colors.white,
        ),
      );
    }
}
Posted by: Guest on July-27-2020

Code answers related to "how to change background color in flutter theme"

Browse Popular Code Answers by Language