Skip to content

Commit 85752a3

Browse files
authored
Merge pull request #89 from gluestack/development
Development
2 parents bf840ab + 92e301c commit 85752a3

File tree

5 files changed

+35
-19
lines changed

5 files changed

+35
-19
lines changed

example/lib/kitchensink-gluestack-example/lib/components/list_your_place_modal/content1.dart

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ class _ListYourPlaceModalContent1State
1414
extends State<ListYourPlaceModalContent1> {
1515
bool isSellSelected = true;
1616
List<bool> selectedPropertyType = List.generate(4, (index) => false);
17+
GSStyle buttonTextStyle = GSStyle(
18+
dark: GSStyle(textStyle: TextStyle(color: $GSColors.textLight200)),
19+
);
1720
@override
1821
Widget build(BuildContext context) {
1922
return GSVStack(
@@ -26,8 +29,7 @@ class _ListYourPlaceModalContent1State
2629
mainAxisSize: MainAxisSize.min,
2730
crossAxisAlignment: CrossAxisAlignment.start,
2831
children: [
29-
const GSText(
30-
bold: true, size: GSSizes.$sm, text: "I want to..."),
32+
const GSText(bold: true, size: GSSizes.$sm, text: "I want to..."),
3133
GSHStack(
3234
space: GSSpaces.$md,
3335
children: [
@@ -37,7 +39,7 @@ class _ListYourPlaceModalContent1State
3739
isSellSelected ? GSActions.primary : GSActions.secondary,
3840
variant: GSVariants.outline,
3941
style: GSStyle(borderRadius: $GSRadii.full),
40-
child: const GSButtonText(text: "Sell"),
42+
child: GSButtonText(text: "Sell", style: buttonTextStyle,),
4143
onPressed: () {
4244
setState(() {
4345
isSellSelected = true;
@@ -50,7 +52,7 @@ class _ListYourPlaceModalContent1State
5052
!isSellSelected ? GSActions.primary : GSActions.secondary,
5153
variant: GSVariants.outline,
5254
style: GSStyle(borderRadius: $GSRadii.full),
53-
child: const GSButtonText(text: "Rent/Lease"),
55+
child: GSButtonText(text: "Rent/Lease", style: buttonTextStyle,),
5456
onPressed: () {
5557
setState(() {
5658
isSellSelected = false;
@@ -113,7 +115,7 @@ class _ListYourPlaceModalContent1State
113115
: GSActions.secondary,
114116
variant: GSVariants.outline,
115117
style: GSStyle(borderRadius: $GSRadii.full),
116-
child: const GSButtonText(text: 'flat/apartment'),
118+
child: GSButtonText(text: 'flat/apartment', style: buttonTextStyle,),
117119
onPressed: () {
118120
setState(() {
119121
selectedPropertyType[0] = !selectedPropertyType[0];
@@ -127,7 +129,7 @@ class _ListYourPlaceModalContent1State
127129
: GSActions.secondary,
128130
variant: GSVariants.outline,
129131
style: GSStyle(borderRadius: $GSRadii.full),
130-
child: const GSButtonText(text: 'independent house/villa'),
132+
child: GSButtonText(text: 'independent house/villa', style: buttonTextStyle,),
131133
onPressed: () {
132134
setState(() {
133135
selectedPropertyType[1] = !selectedPropertyType[1];
@@ -147,7 +149,7 @@ class _ListYourPlaceModalContent1State
147149
variant: GSVariants.outline,
148150
style: GSStyle(borderRadius: $GSRadii.full),
149151
child:
150-
const GSButtonText(text: 'independent floor/building floor'),
152+
GSButtonText(text: 'independent floor/building floor', style: buttonTextStyle,),
151153
onPressed: () {
152154
setState(() {
153155
selectedPropertyType[2] = !selectedPropertyType[2];
@@ -161,7 +163,7 @@ class _ListYourPlaceModalContent1State
161163
: GSActions.secondary,
162164
variant: GSVariants.outline,
163165
style: GSStyle(borderRadius: $GSRadii.full),
164-
child: const GSButtonText(text: 'Plot/Land'),
166+
child: GSButtonText(text: 'Plot/Land', style: buttonTextStyle,),
165167
onPressed: () {
166168
setState(() {
167169
selectedPropertyType[3] = !selectedPropertyType[3];

example/lib/kitchensink-gluestack-example/lib/components/main_component.dart

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,26 @@ class KSMainComponent extends StatelessWidget {
6464
child: GSButton(
6565
variant: GSVariants.outline,
6666
action: GSActions.secondary,
67-
child: const GSHStack(
67+
child: GSHStack(
6868
crossAxisAlignment: CrossAxisAlignment.center,
6969
children: [
70-
GSButtonIcon(
71-
icon: Icons.list,
72-
iconSize: GSSizes.$xl,
70+
GSBox(
71+
style:
72+
GSStyle(padding: const EdgeInsets.only(right: 5)),
73+
child: GSButtonIcon(
74+
icon: Icons.list,
75+
iconSize: GSSizes.$2xl,
76+
style: GSStyle(
77+
dark: GSStyle(color: $GSColors.textLight200),
78+
),
79+
),
7380
),
7481
GSButtonText(
82+
style: GSStyle(
83+
dark: GSStyle(
84+
textStyle:
85+
TextStyle(color: $GSColors.textLight200)),
86+
),
7587
text: 'List your place',
7688
),
7789
]),

example/lib/kitchensink-gluestack-example/lib/main.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class KitchenSink extends StatelessWidget {
134134
data: ThemeData(useMaterial3: false),
135135
child: FloatingActionButton(
136136
onPressed: toggleTheme,
137-
backgroundColor: Colors.pink,
137+
backgroundColor: const Color(0xffE11D48),
138138
child: Transform.rotate(
139139
angle: -7,
140140
child: Icon(
@@ -171,7 +171,9 @@ class KitchenSink extends StatelessWidget {
171171
),
172172
child: ClipOval(
173173
child: GSBox(
174-
style: GSStyle(color: $GSColors.red500),
174+
style: GSStyle(
175+
color: const Color(0xffE11D48),
176+
),
175177
child: const Icon(
176178
Icons.search,
177179
color: Colors.white,
@@ -183,7 +185,8 @@ class KitchenSink extends StatelessWidget {
183185
style: GSStyle(
184186
borderRadius: 99,
185187
onFocus: GSStyle(
186-
borderColor: Colors.pink, borderWidth: 2)),
188+
borderColor: const Color(0xffE11D48),
189+
borderWidth: 2)),
187190
hintText: 'Anywhere • Any week • Add guests',
188191
hintStyle: TextStyle(
189192
fontWeight: FontWeight.w300,

lib/src/widgets/gs_radio/gs_radio_text.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,16 @@ class GSRadioText<T> extends StatelessWidget {
2323
final fontSize = GSRadioTextStyle
2424
.size[ancestorTextStyles?.props?.size]?.textStyle?.fontSize;
2525

26-
2726
GSStyle styler = resolveStyles(
2827
variantStyle: radioLabelStyle,
2928
context,
3029
inlineStyle: value.style,
3130
)!;
3231

33-
final fontColor = isChecked ? styler.checked?.color : styler.color;
32+
final fontColor = isChecked ? styler.checked?.textStyle?.color : styler.color;
3433

3534
final currentHoverColor =
36-
isChecked ? styler.checked?.onHover?.color : styler.onHover?.color;
35+
isChecked ? styler.onHover?.textStyle?.color : styler.checked?.onHover?.color;
3736
final isHovered = GSFocusableActionDetectorProvider.isHovered(context);
3837
final currentTextStyle = TextStyle(
3938
fontSize: textStyle?.fontSize ?? fontSize,

lib/src/widgets/gs_text/gs_text.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ class GSText extends StatelessWidget {
7171
highlight ? styler.bg : styler.textStyle?.backgroundColor,
7272
overflow:
7373
isTruncated ? TextOverflow.ellipsis : styler.textStyle?.overflow,
74+
color: styler.textStyle?.color ?? gstextStyle.textStyle?.color,
7475
);
7576

76-
7777
return Text(
7878
text,
7979
style: currentTextStyle,

0 commit comments

Comments
 (0)