Search
 
SCRIPT & CODE EXAMPLE
 

DART

add bg image to scaffold flutter

@override
Widget build(BuildContext context) {
  return new Scaffold(
    body: new Stack(
      children: <Widget>[
        new Container(
          decoration: new BoxDecoration(
            image: new DecorationImage(image: new AssetImage("images/background.jpg"), fit: BoxFit.cover,),
          ),
        ),
        new Center(
          child: new Text("Hello background"),
        )
      ],
    )
  );
}
Comment

scaffold background image flutter

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: SingleChildScrollView(
            child: Container(
      decoration: const BoxDecoration(
        image: DecorationImage(
            image: AssetImage('assets/bgmain.jpg'),
            //fit: BoxFit.cover 
            fit: BoxFit.fill),
      ),
      child: Column(
        children: 
        [
          //
        ],
      ),
    )));
  }
Comment

Scaffold image background flutter

@override
  Widget build(BuildContext context){
    return Scaffold(
      body: Container(
        decoration: BoxDecoration(
          image: DecorationImage(
            image: AssetImage("assets/images/background.jpg"),
            fit: BoxFit.cover,
          ),
        ),
        child: Text("Hello World!"),
      ),
    );
  }
Comment

PREVIOUS NEXT
Code Example
Dart :: constrainedbox flutter 
Dart :: flutter chip avatar radius increases 
Dart :: flutter list splice 
Dart :: How to create a small circular dot in FLutter code example 
Dart :: target of uri doesn 
Dart :: borderradius.only flutter 
Dart :: get random color in flutter 
Dart :: flutter navigation pop 
Dart :: flutter linear progress indicator height 
Dart :: Flutter turn string to int 
Dart :: flutter snackbar width 
Dart :: how to make appbar transparent in flutter 
Dart :: dart read from terminal 
Dart :: how to disable switch in flutter 
Dart :: dartpad missing browser localstorage 
Dart :: how to load gif in flutter 
Dart :: flutter remove value from list 
Dart :: dart super constructor 
Dart :: How to change the Flutter TextButton height? 
Dart :: dart slice 
Dart :: toast in flutter 
Dart :: flutter get number of days in month 
Dart :: dart count words in string 
Dart :: how to convert string into date format 
Dart :: round container boundary in flutter 
Dart :: sliver persistent tabbar 
Dart :: flutter image load 
Dart :: dart check runtime type 
Dart :: dart create hash 
Dart :: flutter conver string to inr 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =