css_text_for_flutter icon indicating copy to clipboard operation
css_text_for_flutter copied to clipboard

why this is not working in sliver app bar

Open ABINASH56 opened this issue 6 years ago • 0 comments

import 'package:flutter/material.dart'; import 'package:css_text/css_text.dart';

void main() { runApp(MaterialApp( title: 'Androidmonks', home: Scaffold( body: CustomScrollView( slivers: <Widget>[ SliverAppBar(

          backgroundColor: Colors.orangeAccent,
          floating: true,
          actions: <Widget>[
            _Home(),
          ],
        ),
      ],
    ),
  )));

}

class _Home extends StatelessWidget { @override Widget build(BuildContext context) { String htmlContent = """

Hello World!!
How are you today?
But why are you doing this?

Can you tell me?
Please visit Flutter docs

This text is slightly transparent, and has a slightly transparent background too.

""";
var myRichText =
    HTML.toRichText(context, htmlContent, linksCallback: (link) {
  print("You clicked on $link");
});

return Scaffold(
    body: Container(padding: EdgeInsets.all(16.0), child: myRichText));

} }

ABINASH56 avatar Oct 30 '19 16:10 ABINASH56