import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:revanced_manager/constants.dart'; class InstalledAppItem extends StatefulWidget { final String name; final String pkgName; bool isSelected = false; InstalledAppItem({ Key? key, required this.name, required this.pkgName, required this.isSelected, }) : super(key: key); @override State createState() => _InstalledAppItemState(); } class _InstalledAppItemState extends State { @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.symmetric(vertical: 4.0), child: Container( padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 12.0), decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), color: const Color(0xff1B222B), ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( widget.name, maxLines: 2, overflow: TextOverflow.visible, style: GoogleFonts.inter( fontSize: 16, fontWeight: FontWeight.w500, ), ), const SizedBox(height: 4), Text( widget.pkgName, style: robotoTextStyle, ), ], ), ), Checkbox( value: widget.isSelected, onChanged: (val) { setState(() { widget.isSelected = val!; Navigator.pop(context); }); }, ), ], ), ), ); } }