import 'package:gluestack_ui/gluestack_ui.dart';
GSCenter(
child: Stack(
children: [
GSBox(
style: GSStyle(
height: 360,
width: 320,
borderRadius: $GSRadii.$md,
bg: $GSColors.backgroundLight50,
dark: GSStyle(color: $GSColors.backgroundDark900),
),
),
GSFab(
size: GSFABSizes.$md,
placement: GSFABPlacements.bottomRight,
onPressed: () {},
isDisabled: false,
isHovered: false,
isPressed: false,
icon: const GSFabIcon(icon: Icons.add),
label: const GSFabLabel(text: 'Quick Start'),
),
],
),
)
import "package:gluestack_ui/gluestack_ui.dart"
Prop | Type | Default | Description |
---|---|---|---|
placement | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" |
"topCenter" | "bottomCenter" | "bottomRight" | Placement of the Fab |
isHovered | bool | false | To manually set hover to the fab. |
isPressed | bool | false | To manually set pressable state to the fab. |
isDisabled | bool | false | To manually set disable to the fab. |
Name | Value | Default |
---|---|---|
size | sm | md | lg | md |
placement | topRight | topLeft | bottomRight | bottomLeft | topCenter |
bottomCenter | bottom right |
import 'package:gluestack_ui/gluestack_ui.dart';
GSCenter(
child: Stack(
children: [
GSBox(
style: GSStyle(
height: 360,
width: 320,
borderRadius: $GSRadii.$md,
bg: $GSColors.trueGray800,
padding: const EdgeInsets.all(20),
),
child: GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GSHStack(
children: [
GSAvatar(
avatarImage: const GSImage(
path: 'https://images.unsplash.com/photo-1633332755192-727a05c4013d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8dXNlcnxlbnwwfHwwfHw%3D&auto=format&fit=crop&w=800&q=60',
imageType: GSImageType.network,
),
style: GSStyle(
bg: Colors.orange,
textStyle: const TextStyle(color: Colors.white),
),
fallBackText: const GSAvatarFallBackText('Kevin James'),
),
const SizedBox(
width: 10,
),
const GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GSHeading(text: 'Kevin James'),
GSText(text: 'Tech Lead'),
],
)
],
),
const SizedBox(
height: 20,
),
GSHStack(
children: [
GSAvatar(
avatarImage: const GSImage(
path: 'https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1180&q=80',
imageType: GSImageType.network,
),
style: GSStyle(
bg: Colors.orange,
textStyle: const TextStyle(color: Colors.white),
),
fallBackText: const GSAvatarFallBackText('Jacob Jones'),
),
const SizedBox(
width: 10,
),
const GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GSHeading(text: 'Jacob Jones'),
GSText(text: 'Manager'),
],
)
],
),
const SizedBox(
height: 20,
),
GSHStack(
children: [
GSAvatar(
avatarImage: const GSImage(
path: 'https://images.unsplash.com/photo-1599566150163-29194dcaad36?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80',
imageType: GSImageType.network,
),
style: GSStyle(
bg: Colors.orange,
textStyle: const TextStyle(color: Colors.white),
),
fallBackText: const GSAvatarFallBackText('Albert Flores'),
),
const SizedBox(
width: 10,
),
const GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GSHeading(text: 'Albert Flores'),
GSText(text: 'HR'),
],
)
],
),
],
),
),
GSFab(
onPressed: () {},
icon: GSFabIcon(
icon: Icons.edit_square,
style: GSStyle(color: $GSColors.white),
),
),
],
),
)
import 'package:gluestack_ui/gluestack_ui.dart';
GSCenter(
child: Stack(
children: [
GSBox(
style: GSStyle(
height: 360,
width: 320,
borderRadius: $GSRadii.$md,
bg: $GSColors.trueGray800,
padding: const EdgeInsets.all(20),
),
child: GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GSHStack(
children: [
GSAvatar(
avatarImage: const GSImage(
path: 'https://images.unsplash.com/photo-1633332755192-727a05c4013d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8dXNlcnxlbnwwfHwwfHw%3D&auto=format&fit=crop&w=800&q=60',
imageType: GSImageType.network,
),
style: GSStyle(
bg: Colors.orange,
textStyle: const TextStyle(color: Colors.white),
),
fallBackText: const GSAvatarFallBackText('Kevin James'),
),
const SizedBox(
width: 10,
),
const GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GSHeading(text: 'Kevin James'),
GSText(text: 'Tech Lead'),
],
)
],
),
const SizedBox(
height: 20,
),
GSHStack(
children: [
GSAvatar(
avatarImage: const GSImage(
path: 'https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1180&q=80',
imageType: GSImageType.network,
),
style: GSStyle(
bg: Colors.orange,
textStyle: const TextStyle(color: Colors.white),
),
fallBackText: const GSAvatarFallBackText('Jacob Jones'),
),
const SizedBox(
width: 10,
),
const GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GSHeading(text: 'Jacob Jones'),
GSText(text: 'Manager'),
],
)
],
),
const SizedBox(
height: 20,
),
GSHStack(
children: [
GSAvatar(
avatarImage: const GSImage(
path: 'https://images.unsplash.com/photo-1599566150163-29194dcaad36?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80',
imageType: GSImageType.network,
),
style: GSStyle(
bg: Colors.orange,
textStyle: const TextStyle(color: Colors.white),
),
fallBackText: const GSAvatarFallBackText('Albert Flores'),
),
const SizedBox(
width: 10,
),
const GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GSHeading(text: 'Albert Flores'),
GSText(text: 'HR'),
],
)
],
),
],
),
),
GSFab(
onPressed: () {},
icon: GSFabIcon(
icon: Icons.edit_square,
style: GSStyle(color: $GSColors.white),
),
),
],
),
)
import 'package:gluestack_ui/gluestack_ui.dart';
GSCenter(
child: Stack(
children: [
GSBox(
style: GSStyle(
height: 300,
width: 450,
borderRadius: $GSRadii.$md,
bg: $GSColors.trueGray800,
padding: const EdgeInsets.all(20),
),
child: GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GSCheckBox(
icon: GSCheckBoxIndicator(
style: GSStyle(
margin: EdgeInsets.only(
right: $GSSpace.$4,
bottom: $GSSpace.$4,
),
),
child: const GSCheckBoxIcon(),
),
value: "Design",
onChanged: (value) {},
label: const GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
GSCheckBoxLabel(text: "Design"),
GSText(
text: 'Subscribe to updates from the Design Feed',
),
],
),
),
const SizedBox(
height: 20,
),
GSCheckBox(
icon: GSCheckBoxIndicator(
style: GSStyle(
margin: EdgeInsets.only(
right: $GSSpace.$4,
bottom: $GSSpace.$4,
),
),
child: const GSCheckBoxIcon(),
),
value: "Marketing",
onChanged: (value) {},
label: const GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
GSCheckBoxLabel(text: "Marketing"),
GSText(
text: 'Subscribe to updates from the Marketing Feed',
),
],
),
),
const SizedBox(
height: 20,
),
GSCheckBox(
icon: GSCheckBoxIndicator(
style: GSStyle(
margin: EdgeInsets.only(
right: $GSSpace.$4,
bottom: $GSSpace.$4,
),
),
child: const GSCheckBoxIcon(),
),
value: "Engineering",
onChanged: (value) {},
label: const GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
GSCheckBoxLabel(text: "Engineering"),
GSText(
text: 'Subscribe to updates from the Engineering Feed',
),
],
),
),
],
),
),
GSFab(
placement: GSPlacements.bottomCenter,
onPressed: () {},
icon: GSFabIcon(
icon: Icons.add,
style: GSStyle(color: $GSColors.white),
),
),
],
),
)