fancy_gradient_card 0.0.2
fancy_gradient_card: ^0.0.2 copied to clipboard
An simple Flutter Package. By using this Package we can create fancy gradient cards with network images, By Specifing the image decoration inside network image widget and I wrap my container with a Ge [...]
example/lib/main.dart
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:fancy_gradient_card/fancy_gradient_card.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
void _incrementCounter() {
if (kDebugMode) {
print('Card Pressed');
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
FancyGradientCard(
image: 'https://docs.flutter.dev/assets/images/dash/early-dash-sketches5.jpg',
title: 'Dash!...',
color2: Colors.blue,
color1: Colors.purpleAccent,
subtitle: 'he was fluttering people\'s using flutter',
width: 280,
height: 400,
textColor: Colors.black,
subtitleColor: Colors.black,
onTap: _incrementCounter,
padding: const EdgeInsets.all(1.0),
titleStyle: const TextStyle(
fontSize: 32
),
subtitleStyle: const TextStyle(
fontSize: 15
),
)
],
),
),
);
}
}