Commit e6c34346 by danielroek

Improved DartDocs

parent fa20af63
......@@ -3,14 +3,13 @@ import 'package:flutter/widgets.dart';
import 'template/globals.dart';
/// main
void main() {
runApp(BaseflowPluginExample());
}
/// Baseflow Plugin Example
/// Baseflow Plugin Example application
class BaseflowPluginExample extends StatelessWidget {
/// Theme's MaterialColor
/// [MaterialColor] to be used in the app [ThemeData]
final MaterialColor themeMaterialColor =
createMaterialColor(const Color.fromRGBO(48, 49, 60, 1));
......@@ -57,7 +56,7 @@ class BaseflowPluginExample extends StatelessWidget {
);
}
/// Method to create MaterialColor based on RGBO Color
/// Creates [MaterialColor] based on [Color]
static MaterialColor createMaterialColor(Color color) {
List strengths = <double>[.05];
Map swatch = <int, Color>{};
......@@ -79,9 +78,9 @@ class BaseflowPluginExample extends StatelessWidget {
}
}
/// Application main page
/// A Flutter example demonstrating how the [pluginName] plugin could be used
class AppHome extends StatefulWidget {
/// Application main page constructor
/// Constructs the [AppHome] class
AppHome({Key key, this.title}) : super(key: key);
/// Application title
......@@ -91,7 +90,6 @@ class AppHome extends StatefulWidget {
_AppHomeState createState() => _AppHomeState();
}
/// Application main page
class _AppHomeState extends State<AppHome> {
static final PageController _pageController = PageController(initialPage: 0);
int _currentPage = 0;
......
......@@ -5,7 +5,8 @@ import 'package:permission_handler/permission_handler.dart';
import 'permission_widget.dart';
/// List with PermissionWidgets
/// Constructs a [ListView] containing [PermissionWidget] for each available
/// permission.
class PermissionList extends StatelessWidget {
@override
Widget build(BuildContext context) {
......
......@@ -5,32 +5,33 @@ import '../plugin_example/permission_list.dart';
import 'info_page.dart';
/// Constant plugin name
const String pluginName = 'Geocoding';
/// The name of the plugin, which will be displayed throughout the example App.
const String pluginName = 'Permission Handler';
/// Constant GitHub URL to flutter package
const String githubURL = 'https://github.com/Baseflow/flutter-geocoding';
/// Returns Github URL, which is shown in the [InfoPage].
const String githubURL =
'https://github.com/Baseflow/flutter-permission-handler';
/// Constant Baseflow URL
/// Returns Baseflow URL, which is shown in the [InfoPage].
const String baseflowURL = 'https://baseflow.com';
/// Constant pub.dev URL to flutter package
const String pubDevURL = 'https://pub.dev/packages/geocoding';
/// Returns pub.dev URL, which is shown in the [InfoPage].
const String pubDevURL = 'https://pub.dev/packages/permission_handler';
/// Constant application-wide horizontal padding
/// [EdgeInsets] to define horizontal padding throughout the application.
const EdgeInsets defaultHorizontalPadding =
EdgeInsets.symmetric(horizontal: 24);
/// Constant application-wide vertical padding
/// [EdgeInsets] to define vertical padding throughout the application.
const EdgeInsets defaultVerticalPadding = EdgeInsets.symmetric(vertical: 24);
/// Constant list of AppBar Icons
/// Returns [List] with [IconData] to show in the [AppHome] [AppBar].
final List<IconData> icons = [
Icons.list,
Icons.info_outline,
];
/// Constant list of application widgets
/// Returns [List] with [Widget]'s to construct pages in the [AppBar].
final List<Widget> pages = [
PermissionList(),
InfoPage(),
......
......@@ -4,7 +4,7 @@ import 'package:url_launcher/url_launcher.dart';
import 'globals.dart';
/// Page containing Baseflow information
/// [StatelessWidget] displaying information about Baseflow
class InfoPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment