Created
December 27, 2019 22:21
-
-
Save multiarts/43151f0ee69641a415fa545e379c2076 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class AppBarGradient extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
decoration: BoxDecoration( | |
gradient: LinearGradient( | |
begin: Alignment.topLeft, | |
end: Alignment.bottomRight, | |
colors: <Color>[ | |
Color(0xFFff9966), | |
Color(0xFFff5e62) | |
], | |
tileMode: TileMode.clamp | |
) | |
), | |
); | |
} | |
} | |
// Uso | |
AppBar( | |
title: Text('AppBar Gradient'), | |
flexibleSpace: AppBarGradient(), | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment