flutter – I receive an "invalid constant value" when I try to add a style theme to the title in BottomNavigationBarItem

I am adding a theme to the title in BottomNavigationBarItem and I receive the error "Invalid constant value".

I know that it is not the type of theme I am using because I was able to divide my theme method and use the individual constants in the following BottomNavigationBarItem. Hmmm, I was going to post an image that shows exactly what I want to say here, but I guess I still can't.

This is the code that tells me that I have invalid constant values

BottomNavigationBarItem(
            icon: Icon(CustomIcons.wrestlingring2),
            title: Text('Event', style: Theme.of(context).textTheme.button),
          ),

This code is where I added the constant values ​​directly to the style from my buttonTheme method on my style page

BottomNavigationBarItem(
            icon: Icon(CustomIcons.wrestling),
            title: Text('Match Details', style: TextStyle(fontFamily: montserratFont, fontSize: smallTextSize, color: textColorLight)),
          ),

These are the constant values ​​and the theme of the style page button

const smallTextSize = 14.0;
const Color buttonTextColour = Color(0xffdc0000);
const String montserratFont = 'Montserrat';

const buttonTextStyle = TextStyle(
  fontFamily: montserratFont,
  fontSize: buttonTextSize,
  color: textColorLight,
);

I noticed in the flutter code that BottomNavigationBarItem is a constant and I thought this could be the problem

const BottomNavigationBarItem({
    @required this.icon,
    this.title,
    Widget activeIcon,
    this.backgroundColor,
  }) : activeIcon = activeIcon ?? icon,
       assert(icon != null);

but then I noticed that so is RaisedButton, but it doesn't affect me to add a theme.

const RaisedButton({
    Key key,
    @required VoidCallback onPressed,
    ValueChanged onHighlightChanged,
    ButtonTextTheme textTheme,

If there is another way to use the theme with the title in NavigationBarItem, I would appreciate it if someone could point it out. I'd rather not have to fear the entire Buttom navigation bar.

google sheets: the gscript "getValue ()" returns "# VALUE!" error

My spreadsheet shows a number in the ReturnOnInvestment range, not the #VALUE! error. I checked analysisSheet.getRange("ReturnOnInvestment").getA1Notation() to make sure I'm not confused and looking at the wrong cell. (how does it happen, #VALUE! it doesn't appear anywhere on my sheet too, getFormula() It works well.

But this code returns the #VALUE! error in roi.

  var spreadSheet = SpreadsheetApp.getActiveSpreadsheet();
  var listingsSheet = spreadSheet.getSheetByName("Listings");
  var analysisSheet = spreadSheet.getSheetByName("Analysis");
  var roi = analysisSheet.getRange("ReturnOnInvestment").getValue();

ReturnOnInvestment It contains a formula, a simple fraction. If I replace it with an encrypted number, it works as expected.

Do you have any idea why this could be happening?

Obtain the key and its value from a string "Key: Value; Key: Value; Key: Value" in C ++

I provide a method as follows, what about your ideas? Would you share your ideas with me? Would you give me some recommendations in my code?

live demo in coliru

     #include 
     #include 
     #include 
     #include 
     using namespace std;

The function is divided, divides a string "Key: Value; Key: Value; Key: Value" into a single "Key: Value" by the sign & # 39 ;; & # 39 ;.

    void Split(const string strSign, string& strSour, vector& r)
    {
        if(strSign.length() > 0 && strSour.length() > 0)
        {
            std::string::size_type found =  strSour.find(strSign);
            if(found!=std::string::npos)
            {
                string strPart1;
                string strPart2;
                int nSize = strSour.size();

                strPart1 = strSour.substr(0,found);
                strPart2 = strSour.substr(found+1,nSize);

                r.push_back(strPart1);
                if(strPart2.length() > 0)//middle
                {
                    Split(strSign,strPart2,r);
                } 
            } 
            else if(strSour.c_str())//the last one doesn't have sign
            {
                r.push_back(strSour);
            }
        }
    }

Divide the string "Key: Value" into the string "Key" and "Value" with the sign & # 39;: & # 39 ;, then insert on the map

    void MapKeyValue(const string strSign, string& strSour, map& r)
    {
        if(strSign.length() > 0 && strSour.length() > 0)
        {
            std::string::size_type found =  strSour.find(strSign);
            if(found!=std::string::npos)
            {
                string strPart1;
                string strPart2;
                int nSize = strSour.size();

                strPart1 = strSour.substr(0,found);
                strPart2 = strSour.substr(found+1,nSize);

                if(strPart1.length() > 0 && strPart2.length() >0)//Filter the invalid item
                {
                    if(!r(strPart1).length())//if duplicates appear, select the first one
                    {
                        r(strPart1) = strPart2;
                    }
                }
            }
        }
    }

    void GetKeyValue(string& strSour, map& r)
    {
        vector temp;
        //1. split  by sign ';'
        Split(";",strSour,temp);

        //2. split by sign ':', Map Key & Value
        for(int i=0; i<(int)temp.size(); i++) 
        {
            MapKeyValue(":",temp(i),r);
        }

        //3. release
        temp.clear();
    }

     int main()
     {
        string strFaceNameKey = "FaceName";
        string strFontSizeKey = "FontSize";
        string strFaceNameValue = "";
        int nFontSizeValue = 0;

        string strSour = "FaceName:;FontSize:9;FaceName:Tahoma;FontSize:13";
        map temp;
        GetKeyValue(strSour, temp);

        for(auto it=temp.begin(); it!=temp.end(); it++)
        {
            if(strFaceNameKey == it->first)
            {
                strFaceNameValue = it->second;
            }
            else if(strFontSizeKey == it->first)
            {
                nFontSizeValue = atoi(it->second.c_str());
            }
        }
        temp.clear();

        //print 
        cout << strFaceNameKey<< ":" << strFaceNameValue<< endl;
        cout << strFontSizeKey<< ":" << nFontSizeValue<< endl;
    }

Face Name: Tahoma

Font size: 9

7 – How do I create the "Set a data value" from the term reference?

I am using the web form, the web form rules, the web form references and the conditional rules modules to generate nodes from the web form submission. I can generate a new node with fields, except the term reference field with multiple check boxes. When I set a data value with Reference term, shows a list of terms in value and not [data: {component} -value] option in data selectors.

A support request was created 3 years ago for Web Form Rules module: set the data value for the term reference field on a node using token or PHP data.

Google Sheets: Conditional Format, Format of cells if it is greater than "cell value"

The values ​​of K11 – K13 are variable. In the conditional format, I want to use the output of those cells in the "Greater than" function. Typing = k11 It does not work. I'm not sure how to do it. I hope boys who can help.

help

How to correct the error "the expression must be a modifiable value"?

This is the code I'm trying to write, but it gives me an error that says "The expression must be a modifiable value"

cout << "sursa= ";
cin >> s;
re[s] = 0; T[s] = 0;

schema.org – NewsArticle: "logo.itemtype has an invalid value"


This is an invalid HTML, the lapse element can not have a value attribute. And if I could have one, the logo the value of the property would be https://schema.org/, but that is, of course, not the logo. Probably meant this:


While this is Schema.org valid, Google expects a Image object value for logo property, so I could use this:


  VirtualBox

(Note that "Logo" is not suitable alt value in this context.)

C #: Return of performance and "not all code routes return value"

Why the following code:

IEnumerable static private TestYield (bool check)
{
yes
{
returns 1;
}
plus
{
Console.WriteLine ("On the other");
}
}

produces an error with "not all code routes return value".
However, the following code:

IEnumerable static private TestYield (bool check)
{
yes
{
yield return 1;
}
plus
{
Console.WriteLine ("On the other");
}
}

The only difference is the performance. What performance are you doing differently that does not cause the same error?