• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

icapps / flutter-icapps-architecture / 9346758135

03 Jun 2024 08:22AM UTC coverage: 93.711% (-1.4%) from 95.135%
9346758135

push

github

web-flow
Merge pull request #126 from icapps/feature/hover-color

Feature/hover color

38 of 53 new or added lines in 2 files covered. (71.7%)

894 of 954 relevant lines covered (93.71%)

1.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/lib/src/theming/base_theme.dart
1
import 'package:flutter/material.dart';
2
import 'package:icapps_architecture/icapps_architecture.dart';
3
import 'package:icapps_architecture/src/util/environment/os_info.dart';
4

5
/// Holder class for the theme base. Fills in basic shared properties
6
@immutable
7
class BaseThemeData {
8
  /// Gets the base theme to use to build new themes on
9
  static ThemeData get baseTheme {
1✔
10
    return ThemeData(
1✔
11
      pageTransitionsTheme: PageTransitionsTheme(
1✔
12
        builders: {
1✔
13
          TargetPlatform.iOS: const CupertinoPageTransitionsBuilder(),
14
          TargetPlatform.android:
15
              getCorrectPageTransitionBuilder(OsInfo.instance),
2✔
16
        },
17
      ),
18
    );
19
  }
20

21
  /// Builds the correct page transition based on the current OS
22
  static PageTransitionsBuilder getCorrectPageTransitionBuilder(OsInfo info) {
1✔
23
    if (info.isIOS) return const CupertinoPageTransitionsBuilder();
1✔
24
    if (!info.isAndroid) return const ZoomPageTransitionsBuilder();
1✔
25
    if (info.isAtLeastAndroid10) {
1✔
26
      return const ZoomPageTransitionsBuilder();
27
    } else if (info.isAtLeastPie) {
1✔
28
      return const OpenUpwardsPageTransitionsBuilder();
29
    }
30
    return const FadeUpwardsPageTransitionsBuilder();
31
  }
32
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc