main.dart
import 'package:flutter/material.dart';
void main(){
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - Container Gradient Border")
),
body: Center(
child: Container(
width: 300, height: 150, padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [Colors.pink,Colors.yellow,Colors.green]
),
borderRadius: BorderRadius.circular(12)
),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
),
),
),
),
),
)
);
}
More flutter tutorials
- flutter – ActionChip example
- flutter – ActionChip size
- flutter – Chip example
- flutter – Container circle border
- flutter – Transparent status bar
- flutter – How to show hide status bar
- flutter – AppBar center title
- flutter – How to remove AppBar drop shadow
- flutter – How to change AppBar color
- flutter – MaterialApp theme
- flutter – Container padding and margin
- flutter – Container full width
- flutter – How to align Text
- flutter – Space between Text and underline
- flutter – How to add shadow to the Text