Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why this is not working in sliver app bar #5

Open
ABINASH56 opened this issue Oct 30, 2019 · 0 comments
Open

why this is not working in sliver app bar #5

ABINASH56 opened this issue Oct 30, 2019 · 0 comments

Comments

@ABINASH56
Copy link

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

void main() {
runApp(MaterialApp(
title: 'Androidmonks',
home: Scaffold(
body: CustomScrollView(
slivers: [
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));

}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant