📜  flutter textspan onclick - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:06.434000             🧑  作者: Mango

代码示例1
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'),
        )
      ]),
    );