Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cta image #49

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added cta/cta_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cta/cta_btn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions example/lib/utils/item_tile.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';

class ItemTile extends StatelessWidget {
class ItemTile extends StatefulWidget {
final VoidCallback? onTap;
final int index;
final bool selected;
Expand All @@ -12,25 +12,30 @@ class ItemTile extends StatelessWidget {
this.selected = false,
});

@override
State<ItemTile> createState() => _ItemTileState();
}

class _ItemTileState extends State<ItemTile> {
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(2),
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: onTap,
onTap: widget.onTap,
child: Column(
children: [
Container(
height: 60,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.primaries[index % Colors.primaries.length],
color: Colors.primaries[widget.index % Colors.primaries.length],
),
child: Center(
child: Text(
'Item $index',
'Item ${widget.index}',
style: const TextStyle(fontSize: 25),
),
),
Expand Down
Loading