Skip to content

Commit

Permalink
fix: small fixes in flutter
Browse files Browse the repository at this point in the history
  • Loading branch information
omariosouto committed Jan 25, 2022
1 parent b9a3136 commit a653524
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
12 changes: 8 additions & 4 deletions lib/components/griddisplay/griddisplay.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'package:skynexui_components/components.dart';
import 'package:skynexui_components/components/box/flutter/box_base_styles.dart';

class GridDisplay<DataList> extends StatelessWidget {
final List<DataList> data;
class GridDisplay<Data> extends StatelessWidget {
final List<Data> data;
final StyleSheet styleSheet;
final Map<Breakpoints, int> crossAxisCount;
final Widget Function(BuildContext, int) itemBuilder;
final Widget Function(BuildContext, int, Data) itemBuilder;

BoxBaseStyles _boxStyles(
StyleSheet styleSheet,
Expand Down Expand Up @@ -59,7 +59,11 @@ class GridDisplay<DataList> extends StatelessWidget {
bottom: styles.paddingBottom,
),
itemCount: data.length,
itemBuilder: itemBuilder,
itemBuilder: (context, index) => itemBuilder(
context,
index,
data[index],
),
),
],
);
Expand Down
13 changes: 8 additions & 5 deletions lib/components/image/image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ import 'package:flutter/material.dart' as flutter;
class Image extends StatelessWidget {
final StyleSheet styleSheet;

final String data;
final String src;

const Image(
this.data, {
const Image({
Key? key,
required this.src,
this.styleSheet = const StyleSheet(),
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Box(
children: [
flutter.Text(
data,
flutter.Image.network(
src,
fit: BoxFit.contain,
height: 180.0,
width: 180.0,
),
],
);
Expand Down

3 comments on commit a653524

@vercel
Copy link

@vercel vercel bot commented on a653524 Jan 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on a653524 Jan 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on a653524 Jan 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sknui-demobase-react – ./examples/demo_base

sknui-demobase-react-git-main-skynexui.vercel.app
sknui-demobase-react-skynexui.vercel.app
sknui-demobase-react.vercel.app

Please sign in to comment.