Hey Developers, I was working with Sweep Gradient. Can someone help me set parameters to achieve the following output-Colors are- 3A42FF and 37BD95
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/ad67790b-1301-4c00-a53d-99988a40fdf9n%40googlegroups.com.
Actually I want it to start from -90 degree but it is starting from 0degree. Check the attachment below-P.S. I tried changing startAngle and endAngle but I was unable to obtain the desired output.
On Wed, Mar 31, 2021 at 12:55 AM Rakesh Singh <rakeshsh...@gmail.com> wrote:The Code-import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.light(),
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: MyWidget(),
),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
height:200,
width:400,
decoration:BoxDecoration(gradient: SweepGradient(colors:[Color(0xff3A42FF),
Color(0xff37BD95)
]
)
)
);
}
}Expected Output-Code Output-
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/CAHWORbrL4C8vHJbLJSsoLQoc5EGA57tr3D7muOOKvBw5eecKFA%40mail.gmail.com.