Closed itAlvy closed 5 years ago
First things first, I released an update, where you can instead of give a start and an end color, give a gradient. (so it would look like:
@override
Widget build(BuildContext context) {
Gradient gradient =
LinearGradient(colors: [Color(0xff1AB99D), Color(0xff2E2888)]);
Widget regionalSelectionContainer =
Container(decoration: BoxDecoration(gradient: gradient));
return Scaffold(
backgroundColor: Color(0xfff2f1f8),
appBar: GradientAppBar(
// just copy, no modification
gradient: gradient,
elevation: 0, // -----------invalid------------
title: Text('Regional Selection', style: TextStyle(fontSize: 14)),
centerTitle: true,
),
body: Container(
child: regionalSelectionContainer,
));
}
And when I run this, I get
So could you maybe update your library and try it again?
First things first, I released an update, where you can instead of give a start and an end color, give a gradient. (so it would look like:
@override Widget build(BuildContext context) { Gradient gradient = LinearGradient(colors: [Color(0xff1AB99D), Color(0xff2E2888)]); Widget regionalSelectionContainer = Container(decoration: BoxDecoration(gradient: gradient)); return Scaffold( backgroundColor: Color(0xfff2f1f8), appBar: GradientAppBar( // just copy, no modification gradient: gradient, elevation: 0, // -----------invalid------------ title: Text('Regional Selection', style: TextStyle(fontSize: 14)), centerTitle: true, ), body: Container( child: regionalSelectionContainer, )); }
And when I run this, I get
So could you maybe update your library and try it again?
flutter version:1.7.8
You should change the version of gradient_app_bar to ^0.1.3, and then run flutter get again
You should change the version of gradient_app_bar to ^0.1.3, and then run flutter get again
Gradient gradient =
LinearGradient(colors: [Color(0xff1AB99D), Color(0xff2E2888)]);
Widget regionalSelectionContainer =
Container(decoration: BoxDecoration(gradient: gradient));
return Scaffold(
backgroundColor: Color(0xfff2f1f8),
appBar: GradientAppBar(
gradient: gradient,
elevation: 0, // -----------invalid------------
title: Text('Regional Selection', style: TextStyle(fontSize: 14)),
centerTitle: true,
),
body: Container(
child: regionalSelectionContainer,
));
gradient_app_bar: ^0.1.3 import 'package:gradient_app_bar/gradient_app_bar.dart';
It seems that it still doesn't work, emmmm...
Strange, do you still need me to look into it since you closed the issue?
Strange, do you still need me to look into it since you closed the issue?
Need help, I was accidentally shut down
I need a consistent gradient color as a whole, but I can't hide the elevation of the appbar.