How to use inkwell class for responding images in flutter?

This Article is posted by bloggeraatit at 9/20/2019 4:05:34 AM

In this article you will know how to use the inkwell class to navigate by clicking images. ![](../../Uploads/59996e11-8622-4d90-b83e-a974f445efa6.gifwidth="50%height="auto]( This is the code of main.dart file. color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre-wrap;](color: #569cd6;](import color: #ce9178;]('package:flutter/material.dart'; color: #569cd6;](void color: #dcdcaa;](main() => color: #dcdcaa;](runApp(color: #4ec9b0;](MyApp()); color: #569cd6;](class color: #4ec9b0;](MyApp color: #569cd6;](extends color: #4ec9b0;](StatelessWidget { color: #569cd6;](@override color: #4ec9b0;](Widget color: #dcdcaa;](build(color: #4ec9b0;](BuildContext context) { color: #c586c0;](return color: #4ec9b0;](MaterialApp( debugShowCheckedModeBanner: color: #569cd6;](false, home: color: #4ec9b0;](HomePage(), ); }} color: #569cd6;](class color: #4ec9b0;](HomePage color: #569cd6;](extends color: #4ec9b0;](StatelessWidget { color: #569cd6;](@override color: #4ec9b0;](Widget color: #dcdcaa;](build(color: #4ec9b0;](BuildContext context) { color: #c586c0;](return color: #4ec9b0;](Scaffold( appBar: color: #4ec9b0;](AppBar( title: color: #4ec9b0;](Text(color: #ce9178;]("Inkwell App"), ), body: color: #4ec9b0;](Center( child: color: #4ec9b0;](Column( mainAxisAlignment: color: #4ec9b0;](MainAxisAlignment.center, color: #6a9955;](//mainAxisAlignment: MainAxisAlignment.center, children: [ color: #4ec9b0;](Text(color: #ce9178;]("Example of inkwell widget"), color: #4ec9b0;](InkWell( child: color: #4ec9b0;](Image.color: #dcdcaa;](asset(color: #ce9178;]("image/colors.jpg"), onTap: () { color: #4ec9b0;](Navigator.color: #dcdcaa;](push(context, color: #4ec9b0;](MaterialPageRoute(builder: (context) => color: #4ec9b0;](NewPage())); }, ) ], ), ), ); }} color: #569cd6;](class color: #4ec9b0;](NewPage color: #569cd6;](extends color: #4ec9b0;](StatelessWidget { color: #569cd6;](@override color: #4ec9b0;](Widget color: #dcdcaa;](build(color: #4ec9b0;](BuildContext context) { color: #c586c0;](return color: #4ec9b0;](Scaffold( appBar: color: #4ec9b0;](AppBar( title: color: #4ec9b0;](Text(color: #ce9178;]("Next Page"), ), body: color: #4ec9b0;](Text(color: #ce9178;]("."), ); }}

Tags: inkwell



0 Comments
Login to comment.
Recent Comments

Be the first to Comment. You can ask a Query or Share your toughts or Just say thanks.




© 2018 - Fluttercentral | Email to me - Seven.srikanth@gmail.com