Answers for "onclick on textspan flutter"

3

text on click flutter

new GestureDetector(
  onTap: () {
    Navigator.pushNamed(context, "myRoute");
  },
  child: new Text("my Title"),
);
Posted by: Guest on May-19-2021
0

flutter textspan onclick

import 'package:flutter/gestures.dart';
...

new RichText(
      text: new TextSpan(text: 'Non touchable. ', children: [
        new TextSpan(
          text: 'Tap here.',
          recognizer: new TapGestureRecognizer()..onTap = () => print('Tap Here onTap'),
        )
      ]),
    );
Posted by: Guest on May-22-2020

Browse Popular Code Answers by Language