diff --git a/lib/home.dart b/lib/home.dart index 250683d..f0f31c5 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -139,12 +139,14 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular(20)), child: const Row( children: [ - Text( - "Generate Comic", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 24), + SelectionContainer.disabled( + child: Text( + "Generate Comic", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 24), + ), ), SizedBox( width: 4, @@ -199,17 +201,23 @@ class _HomeScreenState extends State { .withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelOne), const SizedBox( @@ -242,17 +250,23 @@ class _HomeScreenState extends State { .withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelTwo), const SizedBox( @@ -285,17 +299,23 @@ class _HomeScreenState extends State { .withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelThree), const SizedBox( @@ -328,17 +348,23 @@ class _HomeScreenState extends State { .withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelFour), const SizedBox( @@ -371,17 +397,23 @@ class _HomeScreenState extends State { .withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelFive), const SizedBox( @@ -414,17 +446,23 @@ class _HomeScreenState extends State { .withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelSix), const SizedBox( @@ -457,17 +495,23 @@ class _HomeScreenState extends State { .withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelSeven), const SizedBox( @@ -500,17 +544,23 @@ class _HomeScreenState extends State { .withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelEight), const SizedBox( @@ -543,17 +593,23 @@ class _HomeScreenState extends State { .withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelNine), const SizedBox( @@ -586,17 +642,23 @@ class _HomeScreenState extends State { .withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelTen), const SizedBox( @@ -644,12 +706,14 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular(20)), child: const Row( children: [ - Text( - "Output", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 24), + SelectionContainer.disabled( + child: Text( + "Output", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 24), + ), ), SizedBox( width: 4, @@ -693,29 +757,13 @@ class _HomeScreenState extends State { "comic panel with${panelInputs[index]}", imagePaths: imagePaths, ), - if (bubbleText[index] != "") - Container( - width: double.infinity, - color: Colors.white, - padding: EdgeInsets.all(4), - child: Expanded( - child: Container( - decoration: BoxDecoration( - border: Border.all( - color: Colors.black), - color: Colors.white), - child: Padding( - padding: - EdgeInsets.all(4.0), - child: Text( - bubbleText[index] - .toString(), - style: - GoogleFonts.bangers(), - ), - ), - ), - )), + if (bubbleText[index].toString() != "") + Text( + bubbleText[index], + style: GoogleFonts.bangers( + color: Colors.white, + decorationColor: Colors.yellow), + ) ]); }, ), @@ -724,7 +772,6 @@ class _HomeScreenState extends State { ), ), ), - //ComicStrip() ], ), ) @@ -803,12 +850,14 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular(20)), child: Row( children: [ - const Text( - "Generate Comic", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 24), + const SelectionContainer.disabled( + child: Text( + "Generate Comic", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 24), + ), ), const SizedBox( width: 4, @@ -877,17 +926,24 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular( 10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: + FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelOne), const SizedBox( @@ -921,17 +977,24 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular( 10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: + FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelTwo), const SizedBox( @@ -965,17 +1028,24 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular( 10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: + FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelThree), const SizedBox( @@ -1009,17 +1079,24 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular( 10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: + FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelFour), const SizedBox( @@ -1053,17 +1130,24 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular( 10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: + FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelFive), const SizedBox( @@ -1097,17 +1181,24 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular( 10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: + FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelSix), const SizedBox( @@ -1141,17 +1232,24 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular( 10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: + FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelSeven), const SizedBox( @@ -1185,17 +1283,24 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular( 10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: + FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelEight), const SizedBox( @@ -1229,17 +1334,24 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular( 10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: + FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelNine), const SizedBox( @@ -1273,17 +1385,24 @@ class _HomeScreenState extends State { borderRadius: BorderRadius.circular( 10)), - child: const Text( - "Add Text", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer + .disabled( + child: Text( + "Add Text", + style: TextStyle( + color: Colors.blue, + fontWeight: + FontWeight.w800, + fontSize: 12), + ), ), ), ), ], ), + const SizedBox( + height: 4, + ), InputField( editingController: _inputPanelTen), const SizedBox( @@ -1329,25 +1448,6 @@ class _HomeScreenState extends State { children: [ GestureDetector( onTap: () async { - // final box = context.findRenderObject() - // as RenderBox?; - // final scaffoldMessenger = - // ScaffoldMessenger.of(context); - // ShareResult shareResult; - // print(imagePaths); - // final files = []; - // for (var i = 0; - // i < imagePaths.length; - // i++) { - // files.add(XFile(imagePaths[i], - // name: 'imageNames[i]')); - // } - // shareResult = await Share.shareXFiles(files, - // text: "text", - // subject: "subject", - // sharePositionOrigin: - // box!.localToGlobal(Offset.zero) & - // box.size); Share.shareXFiles([ XFile('assets/random_comic_panel.jpg') ], text: 'Great picture'); @@ -1362,12 +1462,14 @@ class _HomeScreenState extends State { BorderRadius.circular(20)), child: const Row( children: [ - Text( - "Output", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 24), + SelectionContainer.disabled( + child: Text( + "Output", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 24), + ), ), SizedBox( width: 4, @@ -1484,12 +1586,14 @@ class _HomeScreenState extends State { decoration: BoxDecoration( color: Colors.lightBlue.withOpacity(0.2), borderRadius: BorderRadius.circular(10)), - child: const Text( - "Ok", - style: TextStyle( - color: Colors.blue, - fontWeight: FontWeight.w800, - fontSize: 12), + child: const SelectionContainer.disabled( + child: Text( + "Ok", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.w800, + fontSize: 12), + ), ), ), ),