Skip to content

Commit

Permalink
Add cta image (#49)
Browse files Browse the repository at this point in the history
* Add cta image

* Add cta image
  • Loading branch information
cp-sneha-s authored Feb 27, 2024
1 parent 4206c32 commit 4c3b378
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
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

0 comments on commit 4c3b378

Please sign in to comment.