phone method
Implementation
@override
Widget? phone() {
return ListView.builder(
controller: _scrollController,
itemCount: prompts.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () => {onPromptClick(prompts[index].prompt)},
child: Container(
margin: const EdgeInsets.all(8),
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: getRandomColor() as Color,
borderRadius: BorderRadius.circular(8),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
prompts[index].act,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 10),
Text(
prompts[index].prompt,
maxLines: 4,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontSize: 16,
),
),
],
),
),
);
},
);
}