build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Describes the part of the user interface represented by this widget.

The framework calls this method when this widget is inserted into the tree in a given BuildContext and when the dependencies of this widget change (e.g., an InheritedWidget referenced by this widget changes). This method can potentially be called in every frame and should not have any side effects beyond building a widget.

The framework replaces the subtree below this widget with the widget returned by this method, either by updating the existing subtree or by removing the subtree and inflating a new subtree, depending on whether the widget returned by this method can update the root of the existing subtree, as determined by calling Widget.canUpdate.

Typically implementations return a newly created constellation of widgets that are configured with information from this widget's constructor and from the given BuildContext.

The given BuildContext contains information about the location in the tree at which this widget is being built. For example, the context provides the set of inherited widgets for this location in the tree. A given widget might be built with multiple different BuildContext arguments over time if the widget is moved around the tree or if the widget is inserted into the tree in multiple places at once.

The implementation of this method must only depend on:

If a widget's build method is to depend on anything else, use a StatefulWidget instead.

See also:

  • StatelessWidget, which contains the discussion on performance considerations.

Implementation

@override
Widget build(BuildContext context) {
  return Consumer2<ColorProvider, FontsProvider>(
    builder: (BuildContext context, ColorProvider value, FontsProvider font,
        Widget? child) {
      return Container(
        width: MediaQuery.of(context).size.width * 0.8,
        decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(30),
            color: value.colors.innerBackground),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text(
              // "๐ŸŒ Escape the Everyday",
              AppLocalizations.of(context)!.about_appDesc1,
              style: TextStyle(
                  fontFamily: fontType,
                  fontSize: font.fonts.textSize + 2,
                  color: font.fonts.primaryFontColor,
                  fontWeight: FontWeight.bold),
            ),
            Text(
              // "In the hustle and bustle of daily life, many seek an escape through travelโ€”a means of relaxation, renewal, and exploration. However, the sheer abundance of information available online can make trip planning overwhelming. Navigating multiple websites, guidebooks, and apps to research destinations, attractions, and experiences can be daunting.",
              AppLocalizations.of(context)!.about_appDesc2,
              textAlign: TextAlign.justify,
              style: TextStyle(
                fontFamily: fontType,
                fontSize: font.fonts.textSize,
                color: font.fonts.primaryFontColor,
              ),
            ),
            Text(
              // "โœจ Simplify Your Journey",
              AppLocalizations.of(context)!.about_appDesc3,
              style: TextStyle(
                  fontFamily: fontType,
                  fontSize: font.fonts.textSize + 2,
                  color: font.fonts.primaryFontColor,
                  fontWeight: FontWeight.bold),
            ),
            Text(
              // "Our application aims to simplify the travel planning process and inspire users to embark on memorable journeys. Discovering the most captivating points of interest (POIs) tailored to your preferences has never been easier.",
              AppLocalizations.of(context)!.about_appDesc4,
              textAlign: TextAlign.justify,
              style: TextStyle(
                fontFamily: fontType,
                fontSize: font.fonts.textSize,
                color: font.fonts.primaryFontColor,
              ),
            ),
            Text(
              // "๐Ÿค– Smart AI Recommendations",
              AppLocalizations.of(context)!.about_appDesc5,
              style: TextStyle(
                  fontFamily: fontType,
                  // fontSize: textSize + 2,
                  fontSize: font.fonts.textSize + 2,
                  color: font.fonts.primaryFontColor,
                  fontWeight: FontWeight.bold),
            ),
            Text(
              //Local:
              // "Leveraging GEMMA, one of the latest open-source generative text AI models, our app generates personalized POIs, running locally on the AI server at Lleida Lab using Docker technology.",
              //Gemini:
              // "Leveraging Gemini, one of the latest open-source generative text AI models, our app generates personalized POIs, running locally on the AI server at Lleida Lab using Docker technology.",
              AppLocalizations.of(context)!.about_appDesc6Gemini,
              textAlign: TextAlign.justify,
              style: TextStyle(
                fontFamily: fontType,
                fontSize: font.fonts.textSize,
                color: font.fonts.primaryFontColor,
              ),
            ),
            Text(
              // "๐ŸŒ Immersive Visualizations",
              AppLocalizations.of(context)!.about_appDesc7,
              style: TextStyle(
                  fontFamily: fontType,
                  // fontSize: textSize + 2,
                  fontSize: font.fonts.textSize + 2,
                  color: font.fonts.primaryFontColor,
                  fontWeight: FontWeight.bold),
            ),
            Text(
              // "Through the innovative Liquid Galaxy technology, users can visualize their entire trip on an LG rig with three or more screens. The tours and their information are presented via KML (Keyhole Markup Language), creating stunning and unique visualizations on the LG rig.",
              AppLocalizations.of(context)!.about_appDesc8,
              textAlign: TextAlign.justify,
              style: TextStyle(
                fontFamily: fontType,
                fontSize: font.fonts.textSize,
                color: font.fonts.primaryFontColor,
              ),
            ),
            Text(
              // "๐Ÿ“ฑ Seamless Experience",
              AppLocalizations.of(context)!.about_appDesc9,
              style: TextStyle(
                  fontFamily: fontType,
                  // fontSize: textSize + 2,
                  fontSize: font.fonts.textSize + 2,
                  color: font.fonts.primaryFontColor,
                  fontWeight: FontWeight.bold),
            ),
            Text(
              // "Even without an LG rig, users will enjoy a captivating experience through our app, enhanced by integrated Google Maps. Simplify your travel planning and set out to discover the world with confidence and ease.",
              AppLocalizations.of(context)!.about_appDesc10,
              textAlign: TextAlign.justify,
              style: TextStyle(
                fontFamily: fontType,
                fontSize: font.fonts.textSize,
                color: font.fonts.primaryFontColor,
              ),
            ),
          ],
        ),
      );
    },
  );
}