65 lines
No EOL
1.8 KiB
Dart
65 lines
No EOL
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:pizzaplanner/entities/PizzaEvent.dart';
|
|
import 'package:pizzaplanner/entities/PizzaRecipe/RecipeStep.dart';
|
|
|
|
import 'package:flutter_markdown/flutter_markdown.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
class RecipeStepInstructionPageArguments {
|
|
final PizzaEvent pizzaEvent;
|
|
final RecipeStep recipeStep;
|
|
|
|
RecipeStepInstructionPageArguments(this.pizzaEvent, this.recipeStep);
|
|
}
|
|
|
|
class RecipeStepInstructionPage extends StatefulWidget {
|
|
late final PizzaEvent pizzaEvent;
|
|
late final RecipeStep recipeStep;
|
|
|
|
RecipeStepInstructionPage(RecipeStepInstructionPageArguments arguments) {
|
|
this.pizzaEvent = arguments.pizzaEvent;
|
|
this.recipeStep = arguments.recipeStep;
|
|
}
|
|
|
|
|
|
@override
|
|
RecipeStepInstructionState createState() => RecipeStepInstructionState();
|
|
}
|
|
|
|
class RecipeStepInstructionState extends State<RecipeStepInstructionPage> {
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: Text("From notification"),
|
|
),
|
|
resizeToAvoidBottomInset: false,
|
|
body: Container(
|
|
padding: EdgeInsets.fromLTRB(40, 10, 40, 10),
|
|
child: ListView(
|
|
children: <Widget>[
|
|
ExpansionTile(
|
|
title: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: <Widget>[
|
|
Text(this.widget.recipeStep.name),
|
|
|
|
],
|
|
),
|
|
children: <Widget>[
|
|
MarkdownBody(
|
|
selectable: true,
|
|
data: this.widget.recipeStep.description,
|
|
onTapLink: (text, url, title) {
|
|
launch(url!);
|
|
},
|
|
)
|
|
],
|
|
)
|
|
]
|
|
)
|
|
)
|
|
);
|
|
}
|
|
} |