flutter_greetings 1.0.1 flutter_greetings: ^1.0.1 copied to clipboard
To be able to show greeting message depending upon time.
import 'package:flutter/material.dart';
import 'package:flutter_greetings/flutter_greetings.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Flutter Greetings")),
body: Center(
child: Text(YonoGreetings.showGreetings()),
));
}
}