Skip to content

Commit c2dd7fb

Browse files
committed
-
1 parent f041592 commit c2dd7fb

File tree

7 files changed

+11
-6
lines changed

7 files changed

+11
-6
lines changed

pkgs/example/assets/agent_icon.png

680 Bytes
Loading

pkgs/example/lib/app/app.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ class _MyHomePage extends StatefulWidget {
3030
}
3131

3232
class _MyHomePageState extends State<_MyHomePage> {
33-
final GenUiController _controller = GenUiController(_myImageCatalog);
33+
final GenUiController _controller = GenUiController(
34+
imageCatalog: _myImageCatalog,
35+
agentIcon: 'assets/agent_icon.png',
36+
);
3437

3538
@override
3639
Widget build(BuildContext context) {

pkgs/example/lib/sdk/catalog/carousel.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ class CarouselItem extends StatelessWidget {
3636
width: _imageSize,
3737
height: _imageSize,
3838
child: ClipRRect(
39-
borderRadius: BorderRadius.circular(
40-
10.0,
41-
), // Adjust the radius as needed
39+
borderRadius: BorderRadius.circular(10.0),
4240
child: Image.asset(data.assetUrl, fit: BoxFit.cover),
4341
),
4442
),

pkgs/example/lib/sdk/catalog/invitation.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class Invitation extends StatelessWidget {
1616
return Column(
1717
crossAxisAlignment: CrossAxisAlignment.start,
1818
children: [
19+
Image.asset(controller.agentIcon),
20+
SizedBox(height: 8.0),
1921
TextIntro(data: data.textIntroData),
2022
SizedBox(height: 16.0),
2123
Text(data.exploreTitle, style: GenUiTextStyles.h2(context)),

pkgs/example/lib/sdk/catalog/shared/text_styles.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ abstract class GenUiTextStyles {
1111

1212
static TextStyle h1(BuildContext context) => normal(
1313
context,
14-
).copyWith(fontSize: 36.0, fontWeight: FontWeight.w700, inherit: true);
14+
).copyWith(fontSize: 30.0, fontWeight: FontWeight.w700, inherit: true);
1515

1616
static TextStyle h2(BuildContext context) => normal(
1717
context,

pkgs/example/lib/sdk/model/simple_items.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ abstract class WidgetData {}
44

55
/// A controller for GenUi that can be used to manage state or handle events.
66
class GenUiController {
7-
GenUiController(this.imageCatalog);
7+
GenUiController({required this.imageCatalog, required this.agentIcon});
88

99
final ImageCatalog imageCatalog;
10+
final String agentIcon;
1011

1112
void dispose() {}
1213
}

pkgs/example/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ flutter:
1717
uses-material-design: true
1818
assets:
1919
- assets/explore/
20+
- assets/agent_icon.png

0 commit comments

Comments
 (0)