I used swipe_cards package for tinder like swipe but i am unable to add Text Widget That are appear during left, right and top swipe (noop, like,and super like).
class DatingAppDesign extends StatefulWidget {
#override
_DatingAppDesignState createState() => _DatingAppDesignState();
}
class _DatingAppDesignState extends State<DatingAppDesign> {
List<SwipeItem> _swipeItems = [];
late MatchEngine _matchEngine;
GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey();
List<String> _names = ["1", "2", "3", "4", "last"];
List<Color> _colors = [
Colors.red,
Colors.blue,
Colors.green,
Colors.yellow,
Colors.orange
];
#override
void initState() {
for (int i = 0; i < _names.length; i++) {
_swipeItems.add(SwipeItem(
content: Content(text: _names[i], color: _colors[i]),
likeAction: () {
},
nopeAction: () {
},
superlikeAction: () {
}));
}
_matchEngine = MatchEngine(swipeItems: _swipeItems,);
super.initState();
}
#override
Widget build(BuildContext context) {
double ha = MediaQuery.of(context).size.height -
138 -
MediaQuery.of(context).padding.top;
return Scaffold(
body: Container(
height: ha,
width: double.infinity,
color: Colors.white,
child: Column(
children: [
Container(
decoration: BoxDecoration(
// color: Colors.white,
borderRadius: BorderRadius.vertical(
top: Radius.circular(35.0),
),
),
width: MediaQuery.of(context).size.width*0.8,
height: ha*0.7,
child: Center(
child: SwipeCards(
matchEngine: _matchEngine,
itemBuilder: (BuildContext context, int index) {
return Stack(children: [
Container(
alignment: Alignment.center,
color: _swipeItems[index].content.color,
child: Text(
_swipeItems[index].content.text,
style: TextStyle(fontSize: 100),
),
),
Center(child: Text("Hello World"),),
],
);
},
onStackFinished: () {
},
),
),
),
Container(
height: ha * 0.3,
child: Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
padding: EdgeInsets.all(1),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey,
//offset: Offset(0.0, 1.0), //(x,y)
blurRadius: 10.0,
),
],
color: Colors.white,
borderRadius: BorderRadius.circular(39),
),
constraints: BoxConstraints(maxHeight: 78, minWidth: 78),
child: Center(
child: SvgPicture.asset(
'assets/icons/cross.svg',
// color: Colors.white12,
),
),
),
Container(
padding: EdgeInsets.all(1),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey,
// offset: Offset(0.0, 1.0), //(x,y)
blurRadius: 10.0,
),
],
color: Colors.red,
borderRadius: BorderRadius.circular(49.5),
),
constraints: BoxConstraints(maxHeight: 99, minWidth: 99),
child: Center(
child: SvgPicture.asset(
'assets/icons/heart.svg',
// color: Colors.white12,
),
),
),
Container(
padding: EdgeInsets.all(1),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey,
// offset: Offset(0.0, 1.0), //(x,y)
blurRadius: 10.0,
),
],
color: Colors.white,
borderRadius: BorderRadius.circular(39),
),
constraints: BoxConstraints(maxHeight: 78, minWidth: 78),
child: Center(
child: SvgPicture.asset(
'assets/icons/star.svg',
// color: Colors.white12,
),
),
),
],
),
),
],
),
),
appBar: appbar,
bottomNavigationBar: BottomNevigationDesign(),
);
}
}
I used Gesture Detector but it did not work. I read all event that under swipe_cards use same example that are on pub.dev. I am totally stuck please help me out thank you.
Based on your comment I think you are looking for snackbar in flutter.
https://flutter.dev/docs/cookbook/design/snackbars
Related
I thought of using Stack and Positioned widget thinking it will be a responsive design by default, i even tried the Sizer plugin but for some reason I unable to create a truly responsive design and my widgets are all over the place on different screen
please take a look at my code
#override
Widget build(BuildContext context) {
super.build(context);
return Stack(
children: [
Googlelutter(mapKey: _mapKey, osmController: osmController),
Positioned(
top: 60.0,
left: 0.0,
right: 0.0,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.0),
child: Consumer<AppData>(
builder: (ctx, dsc, child) => (ElevatedButton(
style: ElevatedButton.styleFrom(
shape: const RoundedRectangleBorder(
borderRadius:
BorderRadius.all(Radius.circular(50))),
backgroundColor: dsc.driverStatusClr),
// color: dsc.driverStatusClr,
onPressed: () async {
if (isDriverAvailable != true) {
isDriverAvailable = true;
makeDriverOnlineNow();
getLocationLiveUpdates();
Provider.of<AppData>(context, listen: false)
.buttonOnline(Colors.green.shade300, "Online");
await UserSimplePrefences.setButtonStatus(false);
// });
displayToastMessage("You are Online now", context);
} else {
Provider.of<AppData>(context, listen: false)
.buttonOnline(Colors.black54, "Offline");
driverOffline();
IsolateNameServer.removePortNameMapping(_isolateName);
BackgroundLocator.unRegisterLocationUpdate();
displayToastMessage("You are Offline now", context);
isDriverAvailable = false;
await UserSimplePrefences.setButtonStatus(true);
onStop();
}
},
child: Padding(
padding: EdgeInsets.all(17),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
dsc.driverStatusTxt,
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
color: Colors.white),
),
Icon(
Icons.phone_android,
color: Colors.white,
size: 26,
)
],
),
),
)),
),
),
],
),
),
Positioned(
top: 700.0,
right: 22.0,
child: GestureDetector(
onTap: () {
osmController.currentLocation();
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(22.0),
boxShadow: [
BoxShadow(
color: Colors.black,
blurRadius: 6.0,
spreadRadius: 0.5,
offset: Offset(
0.7,
0.7,
),
)
]),
child: CircleAvatar(
backgroundColor: Colors.white,
child: Icon(
Icons.location_on,
color: Colors.black,
),
radius: 20.0,
),
),
),
),
Positioned(
top: 100.0,
right: 22.0,
child: GestureDetector(
onTap: () async {
//FirebaseAuth.instance.signOut();
await osmController.enableTracking();
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(22.0),
boxShadow: [
BoxShadow(
color: Colors.black,
blurRadius: 6.0,
spreadRadius: 0.5,
offset: Offset(
0.7,
0.7,
),
)
]),
child: CircleAvatar(
backgroundColor: Colors.white,
child: Icon(
Icons.track_changes,
color: Colors.black,
),
radius: 20.0,
),
),
),
),
],
);
}
and let me know how can I fix it ?
Something like this... with respect to device height width.
double deviceHeight:MediaQuery.of(context).size.height;
double deviceWidth=MediaQuery.of(context).size.width;
double width=350;
double height=500;
void checkDevice(){
if(deviceWidth<600) return;
if(deviceWidth>600 &&
deviceWidth<1024){
//for tablet size
width=800;
height=800;
}else{
//for web pages size in desktop
width=1500;
height=1500;
}
}
#override
Widget build(BuildContext context) {
super.build(context);
return SizedBox(width:deviceWidth,height:deviceHeight:child:Fittedbox(child: SizedBox(width:width,height:height,childStack(
children: [
Googlelutter(mapKey: _mapKey, osmController: osmController),
Positioned(
top: height*0.7,
left: 0.0,
right: 0.0,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: width*0.1),
child: Consumer<AppData>(
builder: (ctx, dsc, child) => (ElevatedButton(
style: ElevatedButton.styleFrom(
shape: const RoundedRectangleBorder(
borderRadius:
BorderRadius.all(Radius.circular(width*0.7))),
backgroundColor: dsc.driverStatusClr),
// color: dsc.driverStatusClr,
onPressed: () async {
if (isDriverAvailable != true) {
isDriverAvailable = true;
makeDriverOnlineNow();
getLocationLiveUpdates();
Provider.of<AppData>(context, listen: false)
.buttonOnline(Colors.green.shade300, "Online");
await UserSimplePrefences.setButtonStatus(false);
// });
displayToastMessage("You are Online now", context);
} else {
Provider.of<AppData>(context, listen: false)
.buttonOnline(Colors.black54, "Offline");
driverOffline();
IsolateNameServer.removePortNameMapping(_isolateName);
BackgroundLocator.unRegisterLocationUpdate();
displayToastMessage("You are Offline now", context);
isDriverAvailable = false;
await UserSimplePrefences.setButtonStatus(true);
onStop();
}
},
child: Padding(
padding: EdgeInsets.all(width*0.01),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
dsc.driverStatusTxt,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Colors.white),
),
Icon(
Icons.phone_android,
color: Colors.white,
size: width*0.05,
)
],
),
),
)),
),
),
],
),
),
Positioned(
top: height*0.7,
right: width*0.2,
child: GestureDetector(
onTap: () {
osmController.currentLocation();
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: width*0.07,BorderRadius.circular(width*0.05),
boxShadow: [
BoxShadow(
color: Colors.black,
blurRadius:width*0.005,
spreadRadius: width*0.007,
offset: Offset(
width*0.007,
width*0.007,
),
)
]),
child: CircleAvatar(
backgroundColor: Colors.white,
child: Icon(
Icons.location_on,
color: Colors.black,
),
radius: width*0.07,
),
),
),
),
Positioned(
top: height*0.07,
right: width*0.07,
child: GestureDetector(
onTap: () async {
//FirebaseAuth.instance.signOut();
await osmController.enableTracking();
},
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(width*0.07),
boxShadow: [
BoxShadow(
color: Colors.black,
blurRadius: width*0.007,
spreadRadius: width*0.005,
offset: Offset(
width*0.005,
width*0.005,
),
)
]),
child: CircleAvatar(
backgroundColor: Colors.white,
child: Icon(
Icons.track_changes,
color: Colors.black,
),
radius: width*0.01,
),
),
),
),
],))),
);
}
I need a little help with flutter. I want to make a screen with a condition. The condition is if we have data show that data from firebase but if we don't have data show a button that says add data. The codes below show data from firebase but when we have no data that shows nothing.
Here are my codes that show a black screen.
#override
Widget build(BuildContext context) {
return GetBuilder<MapLogic>(
builder: (mapLogic) => Scaffold(
// backgroundColor: Colors.red,
body: StreamBuilder<QuerySnapshot>(
stream:
FirebaseFirestore.instance.collection('collection').snapshots(),
builder: (context, snapshot) {
if (snapshot.hasData) {
if (snapshot.data!.docs.isEmpty) {
return Padding(
padding: const EdgeInsets.only(top: 30),
child: InkWell(
onTap: () async {
generalController.focusOut(context);
Get.to(const AddNewVehicle());
},
child: Container(
height: 55,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: Styles.primaryColor,
borderRadius: BorderRadius.circular(30),
boxShadow: [
BoxShadow(
color: Styles.primaryColor.withOpacity(0.19),
blurRadius: 40,
spreadRadius: 0,
offset: const Offset(
0, 22), // changes position of shadow
),
],
),
child: const Center(
child: Text(
"Add A Vehicle",
// style: state.buttonTextStyle
),
),
),
),
);
} else {
return FadedSlideAnimation(
child: Wrap(
children:
List.generate(snapshot.data!.docs.length, (index) {
if (snapshot.data!.docs[index].get('driver_id') ==
mapLogic.currentDriverData?.get('id')) {
return Padding(
padding: const EdgeInsets.fromLTRB(15, 30, 15, 0),
child: InkWell(
onTap: () {},
child: Container(
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(19),
boxShadow: [
BoxShadow(
color: customThemeColor.withOpacity(0.19),
blurRadius: 40,
spreadRadius: 0,
offset: const Offset(
0, 22), // changes position of shadow
),
],
),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Row(
children: [
///---image
Hero(
tag:
'${snapshot.data!.docs[index].get('image')}',
child: Material(
child: Container(
height: 80,
width: 80,
decoration: const BoxDecoration(
color: Colors.grey,
shape: BoxShape.circle),
child: ClipRRect(
borderRadius:
BorderRadius.circular(40),
child: Image.network(
'${snapshot.data!.docs[index].get('image')}',
fit: BoxFit.cover,
),
),
),
),
),
///---price
Expanded(
child: Align(
alignment:
Alignment.center,
child: Container(
width: 70,
decoration: BoxDecoration(
borderRadius:
BorderRadius
.circular(
19),
color:
customThemeColor),
child: Padding(
padding:
const EdgeInsets
.fromLTRB(
0, 2, 0, 2),
child: Center(
child: Text(
'\$${snapshot.data!.docs[index].get('dis_price')}',
style: state
.priceTextStyle!
.copyWith(
color: Colors
.white)),
),
),
),
),
),
],
),
],
),
),
))
],
),
),
),
),
);
} else {
return const SizedBox();
}
}),
),
beginOffset: const Offset(0, 0.3),
endOffset: const Offset(0, 0),
slideCurve: Curves.linearToEaseOut,
);
}
} else {
return Text(
'Record not found',
textAlign: TextAlign.center,
style: GoogleFonts.poppins(
fontSize: 20,
color: Colors.black,
fontWeight: FontWeight.w600),
);
}
}),
),
);
}
You can follow this pattern but I will suggest following docs' one
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done &&
!snapshot.hasData) {
return Text("could not find any data");
}
if (snapshot.hasData) {...}
if (snapshot.hasError) return Text("error");
return CircularProgressIndicator();
}
I want to make a custom navigationbar widget in Flutter. The blue circle widget size is bigger than its parent widget. But I don't know how to make it without any plugins. Please see the image for clarification.
class CustomNavBar extends StatelessWidget {
const CustomNavBar({final super.key});
#override
Widget build(final BuildContext context) {
return Stack(
alignment: Alignment.center,
children: [
Container(
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(16)),
),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
width: 150,
child: Row(
children: [
GestureDetector(
child: const Icon(
Icons.phone,
color: Color(0xFF24A3FF),
),
onTap: () {
// On phone tapped
},
),
const Spacer(),
GestureDetector(
child: const Icon(
Icons.contacts,
color: Color(0xFF24A3FF),
),
onTap: () {
// On contacts tapped
},
),
],
),
),
GestureDetector(
child: Container(
height: 50,
width: 50,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.circle,
border: Border.all(color: Color(0xFF24A3FF), width: 6),
),
child: Icon(UniconsLine.plus, color: Color(0xFF24A3FF)),
),
onTap: () {
// On plus tapped
},
),
],
);
}
}
You can use a Stack to achieve this effect
SizedBox(
height: 70,
width: MediaQuery.of(context).size.width *0.7,
child :Stack(
children: [
Center(
child : Container(
height : 40,
width : MediaQuery.of(context).size.width * 0.7,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color : Colors.red,
)
child: Row(
children : [
Icon(Icons.add),
Container(),
Icon(Icons.remove),
]
)
),
),
Center(
child: CircleAvatar(
radius : 70,
)
)
]
)
)
I want to design a Grid like the below output in flutter.
Please help with this.
The Code I have tried is this:
Container(
height: 100,
width: 170,
margin: const EdgeInsets.symmetric(horizontal: 30),
child: DecoratedBox(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Colors.white,
),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Colors.black
),
margin: const EdgeInsets.all(1.5),
child: const Center(
child: Text(
"data",
style: TextStyle(color: Colors.white),
),
),
),
),
),
And the output I get is this:
Thanks in advance for your help.
What you can do to maintain a grid is use Wrap.
Not very efficient for long list of items but for short it will suffice.
Take a look at the code below :
( You can run this code using Dartpad )
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
#override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark(),
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(),
body: Padding(
padding: const EdgeInsets.all(16),
child: LayoutBuilder(builder: (c, box) {
var crossCount = 2;
var spacing = 15.0;
var maxWidth = (box.maxWidth - ((crossCount - 1) * spacing)) / 2;
return Wrap(
spacing: spacing,
runSpacing: spacing,
children: List.generate(
10,
(i) => Stack(
children: [
Container(
width: maxWidth,
height: maxWidth * 0.55 * 0.5,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(16)),
gradient : LinearGradient(
end: Alignment.topLeft,
begin: Alignment.bottomRight,
colors: [
Colors.black,
Colors.black,
Colors.amber,
],
),
// color: Colors.white,
// boxShadow: [BoxShadow(color: Colors.black, blurRadius: 4)],
),
),
Container(
width: maxWidth,
height: maxWidth * 0.55,
margin: const EdgeInsets.all(2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.black,
),
)
],
),
),
);
}),
),
),
);
}
}
Note : Replace the Container's child with your own UI logic for implementing the design you like.
I tried it by myself and manage to built the same.
This is the Code:
Padding(
padding: const EdgeInsets.all(10),
child: GridTile(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Gate 2",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
color: Colors.white),
),
const Text(
"Unlocked",
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w500,
color: Colors.grey),
),
const SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
const Icon(
Icons.lock,
color: Colors.white,
size: 30,
),
const SizedBox(width: 5),
Image.asset("assets/swipe.png",height: 30,width: 30,),
const SizedBox(width: 5),
// const Icon(Icons.lock, color: Colors.white,size: 30,),
Draggable(
axis: Axis.horizontal,
maxSimultaneousDrags: 3,
rootOverlay: false,
child: Container(
padding: const EdgeInsets.all(5),
decoration: const BoxDecoration(
color: Colors.white12,
borderRadius: BorderRadius.all(Radius.circular(100),),
),
child: const Icon(
Icons.lock_open,
color: Colors.orangeAccent,
size: 30,
),
),
feedback: Container(
decoration: const BoxDecoration(
color: Colors.white12,
borderRadius: BorderRadius.all(Radius.circular(100),),
),
child: const Icon(
Icons.lock_open,
color: Colors.transparent,
size: 40,
),
),
),
],
),
],
),
),
),
Here is the Output.
I really need you because I don't have even start idea how to implement these, and also I am not sure how it is called.
Actually, I want to implement something similar like on image (this little circle in each of cards - that is like chain between two cards).
With help of key I have made image from up with this code:
class InfoPage extends StatefulWidget {
InfoPage();
#override
_InfoPageState createState() => _InfoPageState();
}
class _InfoPageState extends State<InfoPage> {
InfoItemModel infoData = dataSourceInfoUser;
double basicSize = 70;
#override
initState() {
super.initState();
}
#override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: Text('Example'),
),
body: Container(
color: Colors.white,
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
width: double.infinity,
height: 150,
child: AppCardField(
child: Text('Something'),
),
),
_buildCardWithCircle(
bgCircleX: 0.78,
bgCirceY: -2.0,
innerContainerX: 0.756,
innerContainerY: -1.78,
colorInner: Colors.orange
),
],
),
),
),
);
_buildCardWithCircle({double bgCircleX, double bgCirceY, double innerContainerX, double innerContainerY, Color colorInner}) => Container(
width: double.infinity,
height: 150,
child: Stack(
children: <Widget>[
Container(
width: double.infinity,
height: 150,
child: AppCardField(
child: Text('Something'),
),
),
Align(
alignment: Alignment(bgCircleX, bgCirceY),
child: Container(
height: basicSize,
width: basicSize,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(50.0),
),
),
),
Align(
alignment: Alignment(innerContainerX, innerContainerY),
child: Container(
height: basicSize - 10,
width: basicSize - 10,
decoration: BoxDecoration(
color: colorInner,
borderRadius: BorderRadius.circular(50.0),
),
child: Icon(Icons.vertical_align_center),
),
),
],
),
);
}
class AppCardField extends StatelessWidget {
final Widget child;
final double height;
final double paddingVertical, paddingHorizontal;
final double paddingVerticalChild, paddingHorizontalChild;
AppCardField({
this.child,
this.height,
this.paddingVertical = 8,
this.paddingHorizontal = 16,
this.paddingVerticalChild = 8,
this.paddingHorizontalChild = 16,
Key key})
: super(key: key);
#override
Widget build(BuildContext context) => Padding(
padding: EdgeInsets.symmetric(
vertical: paddingVertical, horizontal: paddingHorizontal),
child: Container(
height: height,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.all(Radius.circular(8)),
boxShadow: [
BoxShadow(
color: Colors.red,
blurRadius: 15.0,
offset: Offset(0.0, 5.0),
),
],
),
child: Padding(
padding: EdgeInsets.symmetric(
vertical: paddingVerticalChild,
horizontal: paddingHorizontalChild),
child: child,
),
));
}
But here, I have problem with shadow of the card and strongly white background of circle, OFC I need this shadow to be also in this white space, question is how to solve this?
Something like this
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("Some Stuff"),
),
body: Column(
children: <Widget>[
Container(
width: double.infinity,
height: 150.0,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.red,
blurRadius: 20.0
)
]
),
child: Card(
elevation: 20.0,
color: Colors.blueGrey,
child: Text('Something'),
),
),
SizedBox(height: 10.0,),
Container(
width: double.infinity,
height: 150.0,
child: Stack(
children: <Widget>[
Container(
width: double.infinity,
height: 150.0,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.red,
blurRadius: 20.0
)
]
),
child: Card(
elevation: 20.0,
color: Colors.blueGrey,
child: Text('Something'),
),
),
Align(
alignment: Alignment(0.9,-1.5),
child: Container(
height: 50.0,
width: 50.0,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(25.0),
),
),
),
Align(
alignment: Alignment(0.88,-1.35),
child: Container(
height: 40.0,
width: 40.0,
decoration: BoxDecoration(
color: Colors.orange,
borderRadius: BorderRadius.circular(25.0),
),
),
),
Align(
alignment: Alignment(0.85, -1.2),
child: Icon(Icons.access_alarms, color: Colors.white,)
),
],
),
),
],
),
),
);
then you just reaped the card for the other once with different alignment values.