Unverified Commit ff7dd163 authored by Lukas Arnold's avatar Lukas Arnold
Browse files

Applies Flutter formatting conventions

parent 2c6a9cdb
Pipeline #600411 passed with stage
in 1 minute and 38 seconds
......@@ -123,7 +123,7 @@ class ApiConnection {
}
//print('Response body: ${response.body}');
return AppInfo.fromJson(
jsonDecode(response.body.substring(0, response.body.length )),
jsonDecode(response.body.substring(0, response.body.length)),
apiLink);
} catch (e, s) {
print("fetching info failed, error:");
......
......@@ -10,19 +10,34 @@ class Kunstforum {
static const _kFontFam = 'Kunstforum';
static const String? _kFontPkg = null;
static const IconData back = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData circle_athene = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData circle_location = IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData circle_pin = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData circle_seach = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData circle_settings = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData forward = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData location = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData pause = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData pin = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData play = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData restart = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData backward = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData back =
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData circle_athene =
IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData circle_location =
IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData circle_pin =
IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData circle_seach =
IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData circle_settings =
IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData forward =
IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home =
IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData location =
IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData pause =
IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData pin =
IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData play =
IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData restart =
IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search =
IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData backward =
IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}
......@@ -66,7 +66,11 @@ class _CarouselSliderBoxImageState extends State<CarouselSliderBoxImage> {
return Column(
children: [
Expanded(flex: 8, child: addCarouselSlider()),
if(widget.imageLinks.length > 1) Flexible(flex: 1, child: addPageIndicator()) // Only show indicator when more than one artwork is to be shown
if (widget.imageLinks.length > 1)
Flexible(
flex: 1,
child:
addPageIndicator()) // Only show indicator when more than one artwork is to be shown
],
);
}
......@@ -107,7 +111,8 @@ class _CarouselSliderBoxImageState extends State<CarouselSliderBoxImage> {
autoPlay: false,
aspectRatio: 1,
autoPlayCurve: Curves.fastOutSlowIn,
enableInfiniteScroll: widget.imageLinks.length > 1, // Only enable infinite scrolling when at least 2 artworks are to be shown
enableInfiniteScroll: widget.imageLinks.length >
1, // Only enable infinite scrolling when at least 2 artworks are to be shown
autoPlayAnimationDuration: Duration(milliseconds: 800),
viewportFraction: 1,
onPageChanged: (index, reason) {
......
......@@ -146,8 +146,7 @@ class _CarouselSliderCampusBoxState extends State<CarouselSliderCampusBox> {
child: Container(
alignment: Alignment.topLeft,
decoration: BoxDecoration(
image: DecorationImage(
image: NetworkImage(link)),
image: DecorationImage(image: NetworkImage(link)),
),
child: buildImageOverlay(),
),
......
......@@ -70,7 +70,7 @@ class LanguageSettings extends StatelessWidget {
onPressed: () {
Navigator.of(context, rootNavigator: true).pop('dialog');
},
icon: Icon(CupertinoIcons.clear,size: appSetting!.iconSize),
icon: Icon(CupertinoIcons.clear, size: appSetting!.iconSize),
)
])
]);
......@@ -85,23 +85,19 @@ class LanguageSettings extends StatelessWidget {
List<Widget> getLanguageWidgets(String currentLang) {
List<Widget> widgets = [
Padding(
padding: EdgeInsets.all(5.0),
child: Text(currentLang,
textAlign: TextAlign.center,
style: TextStyle(fontSize: appSetting!.buttonTextFontSize)
)
)
padding: EdgeInsets.all(5.0),
child: Text(currentLang,
textAlign: TextAlign.center,
style: TextStyle(fontSize: appSetting!.buttonTextFontSize)))
];
for (int i = 0; i < L10n.allLangString.length; i++) {
if (L10n.allLangString[i] != currentLang) {
widgets.add(Padding(
padding: EdgeInsets.all(6.0),
child: Text(L10n.allLangString[i],
textAlign: TextAlign.center,
style: TextStyle(fontSize: appSetting!.buttonTextFontSize))
)
);
padding: EdgeInsets.all(6.0),
child: Text(L10n.allLangString[i],
textAlign: TextAlign.center,
style: TextStyle(fontSize: appSetting!.buttonTextFontSize))));
// Fill the langCodes with the corresponding order
_langCodes.add(L10n.all[i]);
......
Supports Markdown
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