Skip to content

Instantly share code, notes, and snippets.

@multiarts
Created December 27, 2019 22:21
Show Gist options
  • Save multiarts/43151f0ee69641a415fa545e379c2076 to your computer and use it in GitHub Desktop.
Save multiarts/43151f0ee69641a415fa545e379c2076 to your computer and use it in GitHub Desktop.
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